This is my hardest thing to do. My gaming setup is the same as my work desk. This usually results in me gaming less during the week, but some days I have literally spent 12+ hours at my desk.
That was my de facto setup for the occasional (once a month or less) remote work. When lockdown happened, within a week, sitting in the same spot all day started feeling bad. I realized that I moved into a house last year with spare bedrooms, so I got my work stuff up there (picked up peripherals from the office) along with a table from the basement, just so I could sit in different places throughout the day.
I have two partitions for this very reason. One partition has all my development stuff, including work tools, second partition is on Windows and doesn't have anything remotely work related on it.
I was referring to physical space. I work on a macbook, game on windows, but I'm still sitting in the same chair for either task :)