When you fly into a farmland block on elytra:
farmland reverts to dirt,
player model in 3rd person stands up,
but camera and bounding box are stuck in flight mode.
If you slide out of the trampled block, flight mode ends, player stands up.
Code analysis / Fix
See this comment by @unknown.
Relates to MC-104259 (may be a duplicate, but I think this is more an edge case and not a duplicate)