Need to Press Escape Twice to Quit after Clicking on Git Branch in iTerm2
* iTerm2 version: Build 3.5.0beta10
* OS version: macOS 13.4.1

Detailed steps to reproduce the problem:
1. Open iTerm2
2. Click on the current git branch
3. Attempt to quit
What happened:
I had to press the escape key twice to quit.
What should have happened:
The application should have quit after pressing the escape key once.
issue