MacOS always manages to mess up all the apps between spaces when plugging/unplugging an external screen. Doesn't matter if you assign an app to a screen in a given desktop (with or without a screen plugged in), it will always mess it up over time.
(And yes,) I'm keeping the first screen on each monitor empty (because MacOS merges the first screens of each monitor when the external one is unplugged), but somehow the other apps, with time, will also get into the wrong desktops.
I've found a lot of (good) apps to manage the position of apps in the screen (like Rectangle -free and open source-, and Mosaic) but I can't find an app that keeps certain apps in certain desktops.
(Apologies for the long comment, but the frustration is real.)
https://apple.stackexchange.com/questions/126351/remember-wi...