If a normal door is closed on you there is a chance you will get stuck and cannot move, the door has to be broken or you have to go into spectator mode to get out, you can be locked in a position where you cannot break the door yourself and you are unable to move your head. The door can also glitch into two individual halves and lock you into the "Crawling" mode.
Linked issues
duplicates 1
Comments 2
Duplicates MC-152824 (fixed in 1.14.2).
Duplicate of MC-153079 I suppose
Edit: Nevermind. Actually MC-152824