Keyboard grabbing works inconsistently on Sonoma
When enabling the keyboard grabbing option, all key shortcuts are supposed to be sent to the remote desktop instead of being used locally, for example Command/Alt + Tab will cycle remote windows instead of local ones or cmd-w will close the client window instead of closing a window/tab on the server.
On macOS Sonoma sometimes the keyboard grabbing stops working. This usually happens when activating another window, then going back to the NoMachine client. The problem occurs only when using the mouse to select the window, while keyboad grab keeps working correctly when the NoMachine client is selected by clicking the Dock icon, by using Command + Tab and by selecting the window in Mission Control.
