Issue with scaling object and playing animations

I’m making a 2.5d platformer. All of my characters are 3D and to mirror the animations, I’m scaling the characters on the x axis to 1 or -1. The rigs aren’t Humanoid so I can’t mirror the animations. So to work around this I play a turn animation and after the turn animation completes, I simultaneously scale the character -1 and go into the idle animation. It all works great, except for an occasional 1 frame glitch where after a turn completes, the character snaps to the wrong direction for a frame (because the scale hasn’t updated yet but the idle animation has started) then the scale snaps to -1 and they are facing the correct direction. I’m not using any animation blending as I’m calling animator.Play(). Is there a way to sync changing the animation and scaling to prevent this issue?

I’m calling this once on entering the idle state

FlipToMovementDirection();
animator.Play(idleBlend);
protected void FlipToMovementDirection() {
        if (movementDirection > 0) transform.localScale = Vector3.one;
        else transform.localScale = new Vector3(-1, 1, 1);
    }

Thanks for any help!

Managed to solve this one. The scaling and the animation were actually changing simultaneously. Since the idle is a blend tree with a walk animation, the walk would play for a frame sometimes and then pop to the idle. Im unsure why this happened, but setting the speed parameter which controls the blend tree to 0 before the idle state starts fixed it.