In this case, you won’t face any issues because whenever the agent name is not 007, the ‘System user successfully logged to the system’ alert will be triggered. If the event contains the agent name 007, the alert will be suppressed.
If not the case please share more details regarding your custom rule and the sample logs you were tested. Then I can replicate this scenario.
Let me know if you need further assistance on this.