TPS Tower Defense game enemy ai system

Hey guys, I’m working on this enemy system by following Gorka’s enemy ai tutorial by using blueprint.

I’ve succeded to make most of the ai system but I’ve been facing a problem and I can’t fix this for the last 10 days :
I want the enemy to go back to the factory again after the player is out of sight rather than playing the idle animation which it currently is playing. You can see the blueprint and the results of it in the photo.