The bug
Players who are crawling will remain crawling as long as they intersect a non-full block (e.g. trapdoor), even if there is room to stand up.
How to reproduce
Place two trapdoors using the following commands:
/setblock ~ ~1 ~ oak_trapdoor[half=top]
/setblock ~ ~ ~1 oak_trapdoor[open=true]
Stand near the lower trapdoor:
/execute align z run tp ~ ~ ~0.9
Open the upper trapdoor
→ ✔ You begin crawlingClose the lower trapdoor
Destroy the upper trapdoor
→ ❌ You remain crawling
Duplicate of MC-255253.