Detect when AI Perception loses sight of the player?

looking for solution for this same problem too