Well, I play Minecraft Java on Arch linux and I started to get this bug sometimes. So if I look somewhere camera just spins at random angle. It doesn't happen always but sometimes it does. The angle that I look at to get rotated is not constant. Sometimes it is east sometimes north and sometimes I have to look down and sometimes up. But if I am standing on one spot then I will always get rotation when looking on the same spot
Related issues
Attachments
Comments

Thank you for your report!
We're actually already tracking this issue in MC-144107, 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 – 📖 Game Wiki