Pressing escape key on NSpopover close the popover sender's window when VoiceOver is on

System Version: macOS Monterey 12.3.1

My app has a button which will show popover when clicked the button and make a button in the popover to be the popover's window's firstResponder. When Voiceover is not on, I am able to close the popover using escape key (handled by NSpopover's contentView). But when I turned voice over on, pressing escape key cause both the popover and its parent window to escape, and the debug result showed that the popover's sender received the key event rather the popover (In sender's window pressing escape will close the window). This problem disappeared when I changed the popover's behavior to .applicationDefined (still not working for .transient or .semitransient), but I still want to know why VoiceOver will affect the behavior of NSpopover

Anything on this? how did u fix it?

Pressing escape key on NSpopover close the popover sender's window when VoiceOver is on
 
 
Q