I don't know if it's just on 20w21a or all version since f3+n, but if you turn gamemode into spectator using f3+n or f3+f4, and then do f3+n or f3+f4 again, it moves you. This doesn't happen with /gamemode spectator then /gamemode survival.
To re-create:
Crouch on the edge of a block, and then hold either w+a; w+d; s+a; or s+d in order to go right into the corner.
Let go of the w, a, s, or d keys followed by the shift key.
F3+N or F3+F4
F3+N or F3+F4 again
Watch as you fall off the block
Thank you for your report!
We're actually already tracking this issue in MC-146582, so I resolved and linked this ticket as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature in the future to see if the issue has already been reported.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 📖 Game Wiki