This is another bug that's been around for awhile, that I'm only just now realizing no one has made a report for. 😆
So, here I am, making one, just in case! 😅
Does the issue occur in the editor or during gameplay?
If it's a gameplay issue, please specify which movement system and camera type you're using (free movement vs. grid movement, third-person vs. first-person) or N/A if not applicable:
Briefly describe the issue you're experiencing:
override_animation() plays the animation being overridden in certain circumstances.
when I was testing this bug, I discovered there was a bit more nuance when it comes to this bug,
so, in the "Provide the steps necessary to reproduce the issue:" section of this post, I'll put in the code I input, and what occurs after. : )
Are there any errors in the in-game debug console or external console window?
I got this, but I'm not sure if it's an error or not..

Provide the steps necessary to reproduce the issue:
Example 1:
1st try override_animation(player, "walk", "new_walk");
works as intended
2nd try override_animation(player, "walk", "new_walk");
plays "new_walk" animation
3rd try override_animation(player, "walk", "new_walk");
plays "new_walk" animation
4th try override_animation(player, "walk", "new_walk");
plays "new_walk" animation
etc...
Example 2:
1st try override_animation(player, "walk", "new_walk");
works as intended
2nd try override_animation(player, "walk", "new_walk");
plays "new_walk" animation
3rd try override_animation(player, "walk", "walk");
plays "walk" animation
4th try override_animation(player, "walk", "walk");
works as intended.
5th try override_animation(player, "walk", "walk");
works as intended.
etc...
Example 3:
1st try override_animation(player, "walk", "new_walk");
works as intended.
2nd try override_animation(player, "walk", "walk");
plays "walk" animation
4th try override_animation(player, "walk", "new_walk");
works as intended
5th try override_animation(player, "walk", "new_walk");
plays "new_walk" animation
etc...
At one point, I got this to work
-override_animation(player, "walk", "walk");
plays "walk" animation
-override_animation(player, "walk", "walk");
plays "walk" animation
-override_animation(player, "walk", "walk");
plays "walk" animation.
-etc..
but, I'm not sure what I did different to do this, and wasn't able to reproduce it. : /
Here is a video of the bit that I wasn't able to reproduce.
note: you don't have to use an animation called "new_walk", it works with other animations. this is just what i used for my examples. : )
Provide a download link to the bare bones project (if applicable):