Weight painted mesh stays in place when rotated
Select your head (or weighted object). Go to weight paint mode. Open in the object's properties your vertex group, there you should see a list of all your bones organized as vertex group's influences. Use your keyboard's down arrow to go from top to bottom, one by one until you see the head bone (it should color your head in red color: full influence), keep going down the list and there should be other vertex group influenciating your head. If so: stay on that vertex group,now switch your painting weight brush from DRAW to subtract. Strength 1, weight 1. "Paint to delete" that influence. Repeat for all remaining groups that have influence. Go back to head bone vertex group, switch back the weight brush to DRAW. Strenght to 1, weight to 1. Move your bone head until your head deforms, now paint the remaining vertices (left behind) and they will sit in place now.