Hello,
Don't know if this is a bug in KM or just a peculiar behaviour in macOS, but I can reproduce this in multiple macros on macOS Monterey.
- Enable "Spaces" and set up 3 virtual desktops.
- Create a "Quit & Relaunch" action and choose Finder.
- Export the macro as a trigger file and place it on the Desktop.
- Open any application on Desktop 1.
- Switch to Desktop 2.
- Make a sure no other application is open in any of Desktop 2 or 3 and execute the trigger file.
- Observe that it will switch to Desktop 1 while executing the macro.
- Close the application in Desktop 1 and move to Desktop 3 and open any application.
- Move to Desktop 2 and execute the trigger file again.
- Observe that it will switch to Desktop 3 while executing the macro.
- Keep the application open on Desktop 3 and move to Desktop 2.
- Open any application on Desktop 2 and then execute the trigger file.
- Observe that it will not switch to Desktop 3.
So, it seems, if this particular action is executed without any application open on the current desktop, it will switch desktop before executing this. This does not seem to be the case when running Quit & Relaunch on a regular application such as Chrome.
I have multiple spaces, where one of them is a dev environment opened by KM, and it's highly annoying when it switches to the wrong spaces and opens a million windows' Workaround is to open one of the other applications in the macro before executing the Finder part. Still, wanted to report this since I'm curious what could be the issue.