I have this strange symptom in which all of the apps registered under the automation privacy & security preferences sometimes are non-existent after unlocking my MacBook. I have similar problems with SecureInput messing with keystroke-based utilities such as 1Password or Keyboard Maestro, and I'm guessing this relates to it because what happens is that I cannot run anything depending upon System Events. I must log out and back in again for the SecureInput issue to resolve, and I need to restart for the automation preferences to come back.
I have an installation of macOS Monterey 12.5.1, which is almost new and fresh (a 100% clean installation), with no unique add-ons that could mess with the system in such a manner, so I am not 100% convinced that my apps should be the problem, rather than the system messing up since I have had the same issues in my previous installation.
Concerning SecureInput getting "stuck", it is this app and path that is the culprit: /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow console
Seems to be related to this post.
I have yet to figure out what app or process causes the Automation preferences to disappear temporarily.
Any thoughts regarding this could be helpful since it is pretty annoying.