I have tried multiple desktops (or "Spaces" as they are called on macOS). They work fine when I want to switch to a completely different task (eg. I'll create a space for doing my monthly accounting), but when I use spaces to switch back and forth between eg. IDE and source control, then I have the same problem that switching spaces makes the current task disappear and I forget what I wanted to do.