gameobject deforms when rotation changes

I have made a cubic character and im trying to change his head’s rotation, but when the head is attachde to the body, it horribly deforms. hoever, it seems to work just fine when i change the rotation while the head is outside the body:

This is because it’s parent’s scale is not uniform.
try this, create a cube and an empty object. now make cube the child of empty object.
if you try to rotate cube, it will look fine. now detach cube from empty object(un-parent), change the scale of empty object and then again attach cube as child. now if you rotate the cube it will deform. This is the same thing happening to your head object.

you have to add an empty object in between head and it’s current parent. this new object’s scale should be such that it’s global scale is uniform(all x y and z are same). what you see in inspector is local scale. Easy way to calculate the scale of this new intruder object is invert the scale of parent.
if parent’s scale is 2 1 4, intruder’s scale will be 0.5 1 0.25.