How to make AI keep wandering after it can't find me?

So, the AI character wanders around in the level, and whenever I enter its in line of sight, it chases me. But whenever it can’t find me after I leave its line of sight, it just stands there. How do I make it resume wandering again?

Here are the AI blueprints:

First, don’t use tick. That’s like a kid nagging you in the back seat “Are we there yet?”. Instead make a custom event, name it WanderEvent, and connect it to"wander AI move to" and on fail call the WanderEvent so it’ll always wander. That’s your first loop. Second you have no way of telling the AI that the player is out of sight. It’s gonna chase your character forever unless you give it a range to stop or block it’s path or do a manual pawn sense to see if any pawn is sensed or line trace or endoverlap trigger. Once you make that trigger connect it to WanderEvent. Also on all your fails make it wander. That’s what fail mean. It fail to reach it’s target/location.

Good luck.

Thanks a lot man!