When entities go into minecarts, sometimes they clip into the ground or they can float above the minecart while still riding it.
Steps to reproduce:
1. Have an impulse command block with this code on a 10 tick clock
execute at @e[type=villager,dz=-1,dx=-1,dy=1] run summon minecraft:minecart ^ ^ ^
2. In front of the command block have a powered rail facing down like a ramp.
3. place a villager 2 blocks above the rail falling onto the rail.
4. The villager has a chance of being misaligned.
Please check if this is still an issue for you in 1.16 Release Candidate 1 or later.