Losing window focus every 5 minutes. Narrowed it down to BluetoothUIServer
This has been happening since before Monterrey, but only recently started trying to figure the issue out:
Whenever I have my macbook's bluetooth turned on, no mater what window I have active it will without fail lose focus every 5 minutes on the dot.
Using https://github.com/XQuartz/xquartz-old-tickets/blob/master/attachment/ticket/58/watch_activations.py I narrowed it down to com.apple.BluetoothUIServer located at /System/Library/CoreServices/BluetoothUIServer.app. That process is stealing focus, but I don't see its window. It's not visible when cmd+tabbing, etc.
In activity monitor I can see that it is my user that runs it and if I terminate the process, it will reappear exactly on schedule every time.
The only way I can stop this from happening is disabling bluetooth from system preferences. I'm thinking of reinstalling the OS, but not sure how much good that'll do and want to avoid it if there's anything else I can try before.
Some screenshots: