Navigation agent keeps moving when avoidance is enabled

Godot Version

4.3

Question

Navigation agent keeps moving when avoidance is enabled

I have an enemy that goes towards the player, this enemy has a scripts that allows me to stopped from following the player whit just setting a bool to false but if the avoidance property is enabled the enemy keeps moving despite the script telling this enemy to not do so, this only happens when the avoidance property is enabled.

Without avoidance and stopping the enemy from following the target:

With avoidance and stopping the enemy from following the target:

the only difference i have in both videos is that avoidance is enable, perhaps this behavior is what should occur but I ask because I’m not sure if that is the case, any idea if this is what should happen?

And if this behavior is the correct one, could you tell me why?