Wait, how do you make design decisions while working on another feature? When is the design work for the first feature done if you've switch to another task?
I slip into this sometimes too, but I feel it's a procrastination pattern to avoid thinking about something difficult, and context switching doesn't really move progress on the original hard problem. It's something I typically try to avoid.
The same thinking everyone claims is happening subconsciously when they're showering or riding their bicycle or whatever that doesn't focus on their code also happens to me when I'm not focused on that code.
Recently I had to decide how to rebuild a fairly large component of our compiler (several passes, artifact emission, etc). It took me about a week for the idea (for how to best do it) to occur to me. I spent that time working on our runtime instead. Then once I had the design/architecture, I worked for 2 weeks straight to implement. And during that 2 weeks I figured out a path forward on something I was blocked on in the runtime.
Right, I also claim this happens[1], but my observation is that the background thinking only reliably seems to resolve when you step into the metaphorical shower. If you stay deeply focused on something else instead, the background processing seems to be supplanted with thoughts about the new problem. It's in fact the main reason why I put so much emphasis on stepping away from the work. Whenever I do I come away with a long list of solutions, often at a pace where I'm barely able to write them down before the next one arrives.
Your observation is backed up by modern neuroscience. Effective multitasking is largely a myth.
Obviously one can context switch, but every switch comes at a cost. That cost could be hidden by happiness boosts from not having to think about this difficult thing (=pain) and instead do something simpler that feels like lower hanging fruit and gives more immediate gratification (=reward). But the shower you mention is key and can't provide progress on multiple hard things at once. I agree that this is akin to a procrastination strategy and commend you for the analysis and self reflection.
I slip into this sometimes too, but I feel it's a procrastination pattern to avoid thinking about something difficult, and context switching doesn't really move progress on the original hard problem. It's something I typically try to avoid.