Player's rotation displayed in f3 window is different from the rotation that the /data get -command gives. See the pictures below.
I used the following command:
/data get entity @s Rotation[0] 1
Related issues
Attachments
Comments

[media][media]

It not the F3 menu that's wrong, it's the NBT, see MC-121855.