I use multiple desktops and run almost every app in full screen. Oftentimes when I focus a window on a secondary desktop that isn’t fullscreen (like a Finder window), then click on the Dock icon of a full screen app, MacOS will focus the primary desktop instead of the desktop with the full screen app.
Do you ever experience this behavior? Is there a better way to switch between apps?