"Seems so. Just don't let it notice you beforehand... If it does, the Palace's security level will rise."
The Security Level is a mechanic in Persona 5.
"Well, the security level will go back down if we can beat more enemies without getting noticed."
Palaces are highly guarded by shadows to protect the Cognition of the Palace. If the protagonist fails to remain hidden from a nonscripted Shadow fight and is spotted, the owner becomes alerted of the Phantom Thieves of Hearts presence in their Palace. Additionally, running from battle also increases the Security Level meter. When the meter reaches 100%, exploration is halted, the Phantom Thieves are forced to retreat immediately from the Palace and they must come back on another day. Players can lower the Security Level by ambushing Shadows and defeating them.
Revisiting the Palace on another day will reduce the meter a bit as well. The Security Level can be subsided by Ichiko Ohya's Confidant ability (theoretically Ichiko reports unfavorable scoop about the owner of the current Palace to distract that person from noticing the player's activities in the Palace.) If the player has connected to the online "Thieves Guild," a request can be made to reduce the Security Level when it hits 100%.
When the Phantom Thieves send a calling card, the Palace's Security Meter is fixed at 99% and will not boot the player even when being discovered and ambushed by any enemy. Players can fight shadows and lower the Security Level even after the calling card has been sent, however it has no effect on the upcoming boss fight.