I don't so much switch off, as switch modes, by forcing some kind of "commute". Sometimes this involves going for a run, or even a walk around the block; other times it's half an hour in a VR headset (I have an Oculus Quest, which helped hugely during shielding and lockdown). But whatever it is, I just make it long enough and different enough from work that when I return to reality/the flat, I've got my not-work head on.