I had a similar problem at one point, then finally figured out it was when I accidentally hit the fn button which triggered the emoji picker window and moved focus to it (IIRC), but it was off-screen because I'd previously used it on a secondary monitor. Reconnecting the monitor and moving the window back to my primary display fixed it. (Obviously, it's a bug to show a picker window outside of visible coordinates, and I think it got fixed eventually.)
But it also might not be Apple at all, if it's some third-party background utility with a bug. E.g. if that were happening to me, my first thought would be that it might be a Logitech bug or a Karabiner-Elements bug. Uninstalling any non-Apple background processes or utilities seems like a necessary first step.