Weird shaking with layer-masked animation (video of the error attached)

Hi , i am facing this problem that i’ve been trying to solve for 2 days now.
So i am doing your good ol’ upper body - lower body mask layers , nothing special there , got the ybot model from mixamo and got a running and a “casting-spell” animation in order to do the casting while running animation and here’s where the problem shows.

as you can see whenever i start the running animation on its own things are fine , but as soon as i cast a spell things get out of sync , its like as if there’s a rotation offset being added after everytime i play the animation, and as you can see once i reset and start walking normally things get back to normal.
note that the offset thing DOES NOT happen when i remove the mask.

Things i tried to fix the issue :

  • setting the rig to humanoid
  • setting the rig to generic
  • modifying the mask i used
  • checking the model is in T-pose
  • modifying the root of the rig ( tried to set it to hips and spine )

any kind of help would be appreciated here

Ok , problem solved , the issue was that both layer were playing the SAME animation , which i dunno why that would cause a problem.
nonetheless removing the animation from the mask and having it playing in ONLY ONE layer solved the issue.