Hide Other Applications not working recently

I'm seeing lots of instances where the "Hide Other Applications" action doesn't work right recently. I have this action on a hotkey (F2), and some applications seem to be fighting hiding - BUT, if I manually go to the application menu and go to "Hide Others", it works.

For example, I was in BBEdit just now, and pressed F2, the Numbers window in the background stayed visible. Without doing anything else I went to the BBEdit menu and went to "Hide Others", and Numbers dutifully disappeared.

I'm not sure if this is related, but I recently updated to macOS 15.5.
I also noticed a problem with the Application Switcher recently where an application that was running wasn't shown in the switcher. I don't recall now if that was before or after the OS update though.

I've changed my macro to simulate cmd+opt+H instead of using the "Hide Other Applications" action and that seems to work.

I've noticed a few other problems as well recently that are related to this.

For example, I have hot keys set up to move/resize the front window, and sometimes the wrong window is being resized.

I tested this in the editor today:

Here, KM is in the background, the foreground app and window is Calendar, but KM thinks that KM is at the front, and as expected, my macros for window moving/resizing are effecting the KM window, not Calendar.

I've been getting these errors recently as well. I assume KM looks to make sure the app activated, but doesn't see it, so this error gets triggered:

Action 1104 timeout exceeded. Macro "Calendar" cancelled (while executing Activate Calendar.app).

This happened with Numbers as well (from my original post).

After quitting and re-opening Calendar, it started working properly.
I have a theory that this happens when an application is restored after a reboot - but I haven't tested this.

I can't replicate that problem using your instructions. I tried.

The timeout probably occurs exactly 20 seconds after the action because the default timeout for the Activate a Specific Application action has a 20 second timeout by default.

What does it mean you "restore an application"? Are you dragging applications between folders? I agree, that's suspicious.

Yeah, I suspect it's not something that's easy to replicate unfortunately.

When you leave an application open, but restart your computer. When it boots back up, the application automatically re-opens.
I know it doesn't make much sense logically, but this process seems to work somewhat differently than when you manually open an application.
For example, I can consistently replicate a problem with the Arc app when rebooting/reopening after reboot. After reboot Arc is open, but I can't interact with it - I have to quit the app and re-open it manually then it works fine. I feel like I've seen this happen with a few other applications as well, but I haven't paid close enough attention.

Well, if you can't interact with it yourself, then it's not KM's fault.

Well right. Ignore that one, it’s a strange issue and has nothing to do with KM. Calendar in this case was working. My guess is it’s a bug in the OS or in some of Apple’s apps. So far I’ve seen issues with KM with Numbers and Calendar.

I haven't seen this issue, and I use Numbers, Calendar and macOS. Are you using any third party utilities, other than KM?