To consistently reproduce this issue, place a trapdoor on the top half of a block as opposed to the bottom half of the block above, both of which put you in crawl mode. Then open the trapdoor and crawl right up against the block that the trapdoor is placed on and then "close" the trapdoor (so that it is in its vertical position, which is technically open: true). Once in this state, switching to spectator will cause this bug to happen every time.
This is based on my personal testing done in only 1.20.4 so I am making the assumption that this works every time for every world and every affected version.
To consistently reproduce this issue, place a trapdoor on the top half of a block as opposed to the bottom half of the block above, both of which put you in crawl mode. Then open the trapdoor and crawl right up against the block that the trapdoor is placed on and then "close" the trapdoor (so that it is in its vertical position, which is technically open: true). Once in this state, switching to spectator will cause this bug to happen every time.
This is based on my personal testing done in only 1.20.4 so I am making the assumption that this works every time for every world and every affected version.
[media]