I recently ran into an issue with losing focus while working. An incredibly annoying problem for anyone that has experienced it.
Alt-Tab did not show anything useful and Alt-Space didn't either.
Fortunately, I found the Adminscope Windows Focus Logger, which identified my problem in about 60 seconds.
It's freeware, and there is no install. Run the GUI and watch what happens. Soooooo awesome.....
In my case, Razer Synapse kept stealing the focus.
I suppose I should have clued in when I saw an "Unacceptable character" message pop up a few times - the font used was subtly different than a standard Windows dialog. But the message was right over my Word navigation pane, leading me to believe the Word nav pane was somehow stealing focus.
Shutting down Synapse and restarting appears to have fixed it. I think the problem only happens when you pop up Synapse, record a new macro or something, and then close it. Somehow, it doesn't fully close.
I have a multimonitor system with multiple desktops (via Dexpot) so perhaps this is contributing.