Hi.
From an event tick i compare the distance of the enemy to the player with the pawn sensing components distance.
If that distance is greater it should return a true then i set the pawn sensing to False.
If it is false meaning the pawn in within the range then i set it to true.
I added do Once after both events making them reset each other as to not continuously trigger the setting of the variable.
Hope that helps