My horse does this when he’s bareback. It’s probably just because he’s avoiding being uncomfortable (my horse does this bareback because he doesn’t like his hair messed up) so maybe he’s avoiding being uncomfortable or hurt? Idk what you ride like so I can only assume he’s not afraid of being hurt. Maybe it’s uncomfortable for him?
I’m having the exact same issue but what is working for me so far is getting someone else to stand her still then slowly get them to hold her lightly then eventually not at all to the point where I am holding her and she’s not moving also consistently plays a big role the more you get her to stay still and give praise,the better!
Hope this helps