How do I make my character undetected to AIs ?

I have this code for AI to detect player in my game, but I want to make my player undetected if a event "change player visibility " triggered, is it possible if I change the tag of my character to something else, or is there any other way I can do this?

A tag could work, they would still detect the player pawn but do nothing about it. Or notify the AIs and disable sensing: