Rotation resets to 0 when i deselect a part

I’m using the latest version. If i deselect a part and select it again, the rotation is back to 0 and the selection box is straight up.