This Mac Screen Sharing connection pop up field cannot be cancelled easily

it stays behind when the screen sharing window opens up.
failed to cancel this dialog from time to time when I trigger this :

If the window is at the front, the Press a Button action should be able to press the Cancel button. Or I imagine Type a Keystroke Escape would probably work.

Thanks, you replied so quick today ><"
I'd tried that many times click or press button, it still fails from now onwards !
but used to type command period and succeeded a few times before.
then I came up with idea of altering those Macros : input the field values it requires and it will surely disappear !

ah yes, Escape key is a good choice too.
but I suddenly figure out it may be the reason of once the sharing screen connected, all the coming up inputs are focused into the sharing window. and that is why sometimes command period worked when the sharing screen is still building up connection without poping up the window.