When an entity is stepping up blocks, the client code fully ignores any entity collisions which are fully above the hitbox of the entity performing the step up.
I have provided 3 different scenarios, where this leads to reproducable “glitchy” behaviour.
1. By riding a pig with a carrot on a stick into a block with a shulker on top as seen in shulker_pig.mp4
2. By stepping into a 1.5 block tall gap underneath a shulker as seen in shulker.mp4 (make sure to either use the command tick freeze or spawn a shulker with {NoAI:1b} so it stays in place)
3. By increasing the step height and stepping up a stack of blocks with a boat/shulker on top as in boat.mp4 (here I increased by step_height attribute to 2.
Possibly a fix of this could be combined with a fix/improvement of MC-260743.
Thank you for helping us improve Minecraft! We saved your files: