Before 23w41a snapshot mobs that had their cart broken would dismount onto a nearby block but after that update it was broken so they will only be placed directly where the cart was broken even if there's room along the sides.
see images. images with mob on side is how it use to work. Images with mob in center is broken versions.
Linked issues
Attachments
Comments 2
turns out i already made a bug report on this here MC-266123
Can confirm in 24w20a.