Animated Sprite Not Flipping When Using Shaders

Godot Version

4.6 Stable

Question

I’m making a top down 2d pixel art game in godot and I want to sue shaders but no matter what shader I apply the Player’s Animated Sprite doesn’t flip when its supposed to. This only Happens to the Player’s Sprite as the enemies in the game are flipping just fine. I even tried shifting the z-index of the colorrect, on which the shader is applied, behind the player and even behind the main level but still , Whenever the shader is active somehow the animated sprite isn’t flipping and its not about my code being wrong as it flips when the shader is not active. If anyone knows the solution to this Please let me Know.

Provide more context.