To recreate:
- make a 2x1 spaces surrounded with blocks
- spawn a villager on the inside the space.
- go standing insde the villager
you don't get pushed to the other block, and stay inside the villager. moving a bit will result in getting pushed.
This seems to only happen when the villager is standing inside a corner, but I'm not sure of that.