How to use Lookat aimoffset with lying down animation

I have a head and upper body lookup aimoffset that works perfectly when the character is standing. But when the character is lying down the head starts to turn completely wrong. Instead of just looking left-right and up-down it starts to roll around forward axis (it means, going to one shoulder or another). There is even no animation like that in the aim offset. It looks like the unreal is thinking the head is still vertical and then apply incorrect rotations.

Does anybody know how to solve this problem?

Make an aim off set for the prone position and change the migration path

So I need one aim offset for standing, one for lying on the back, one for prone. And for standing to lying animations I should ask player not to watch?

I mean, normal LookAt node works correctly, except that it will only rotate one bone and it’s not pretty. I think there is some coordinate space mismatch. LookAt node uses Component space.

Btw, I solved the problem by writing a custom anim graph node that calculates lookup offset in local space and stores it in curves.