Two things worth knowing beyond the structural fix.
Your thirty minutes may be more than switching. Time it honestly for a few days and split it: how much is genuinely reloading the project, and how much is the drift that happens at any transition: the coffee, the inbox, the five minutes on something else. Those are different problems with different fixes, and most people find the second is bigger than they expect. Switching gets blamed for the whole transition.
The residue is real and it is worse when you leave things unfinished mid-thought. Stopping at a natural boundary, a completed piece, a passing test: costs much less on both ends than stopping in the middle. Where you have a choice, spend five extra minutes finishing the unit rather than stopping on the hour.
And a caution about the opposite failure: some people respond to this by refusing to switch at all and letting two of the three projects rot for a fortnight. That has its own cost, paid by other people, and it comes back as a much larger interruption when something goes wrong.
The realistic target is not zero switching. It is fewer, larger blocks, with a note at each exit: which between them will get you most of that hour back without changing your commitments.