Mac losing focus on active window
I have an M1 Mac Mini, running the latest MacOS (Monterey), and for the past few days I've had this weird problem where the Mac spontaneously loses its focus on the active window. That is, I'll be typing away in, say, a Word document, when suddenly the text entry cursor vanishes, and I get beeps (but no more text) when I strike the keys. I have to grab the mouse and click inside the window to re-activate it and continue typing. This happens in ALL applications. Does not happen in Safe Mode, so it's apparently due to some bit of installed software, but it'll take forever and a day to weed out the culprit.
Anybody have any clues as to what sort of programs I should be focusing my attention on? What operation(s) would cause the Mac to abandon focus on the active window?
Mac mini, macOS 12.4