@Vero I've found a way to reproduce the loss of Alfred's hotkey almost 99% of the time; there are random times when this does not trigger the problem. And yes, I do get the following console message when this occurs:
CPS: Denying Alfred the right to be in front because secureTextInput is active and this process doesn't have secure text mode enabled, and this request was not caused by user activity
In my case, I have MariaDB installed via Homebrew so the easiest way for me to trigger this problem is by getting mysql to prompt me for a password:
❯ mysql -u root -p
Enter password:
Now if I attempt to trigger Alfred with my hotkey (Control-Space), nothing happens even after I dismiss the password prompt with Control-C or by entering a password. I have to re-launch Alfred in order to get the hotkey working. However, interestingly, keyboard shortcuts for my various workflows still work, even at the password prompt that disabled my Alfred hotkey.
I am running iTerm2 3.4.12 (Secure Keyboard Entry is disabled) on macOS 12.0.1 with Alfred 4.6.1 [1274].
I've noted that the same behaviour sometimes occurs with some other password prompts, too, like the one that the Microsoft Teams app displays when it wants you to login.