Attacking Animation doesn't work properly. Please Help!

Basically, I have created a very basic AI, there are three states, chasing the player, wandering, and attacking the player. The first two states works just fine; and for the attacking player, I have set up a trigger box that plays an “Attacking” animation once the player overlaps with it; however, the problem is when the player ends overlapping with the trigger box, the attacking animation does not stop. I tried adding “Set Animation Node” that forces the AI to return using the animation blueprint, but that didn’t work. So I wonder is there any solution to it? Thanks!

P.S. Below is a picture of the AI blueprint.

Perhaps you can create a variable to be set on overlap and then get it inside of your AnimationBlueprint. You can then create a new Attacking state and add a transition rule bound to this variable. This way when you have it set to true you will get to the Attacking state and as soon as it is false you will be able to return to your idle/running state or whatever else.