I've found that this only works in very specific circumstances. If you have any flexibility to your work schedule (which is a lot more common nowadays with any amount of remote work) this becomes massively inconvenient, as every small context switch means reseting your current system state (eg closing your dev tools).
I don't really have a set work schedule, so it's normal for me to jump between a work context and a play context. It's much easier to do by very rarely rebooting my computer (once or twice a month), so I can always pick up where I left off. The regularly scheduled update meetings do a good enough job of keeping procrastination in check.