When using the /tp command on a player that is currently shifting the orientation of that player will be reset to 0.
Tested with a commandblock clock:
1. Create a commandblock with
/tp @p[r=5] ~-1 ~ ~
(or something similar)
2. Connect it with a simple clock
3. Walk in the detection radius: You will be teleported correctly, without changing the orientation
4. Now sneak and walk again into the radius: You will be teleported, but now looking in another direction (always 0, see debug screen).
This is a duplicate of MC-45261. Please use the search function to check before posting in the future. If you could not find the original report, please comment with the keywords you searched for.