This skill doesn't come naturally to some people, but it can be developed and it will make you more productive.
In particular, develop the ability to enforce encapsulation on your mental model of the program you are working on, so you don't need to keep the entire thing in your head all the time (this will probably make your code better too). This makes it easier to get back into the flow after being interrupted.
The most productive engineers I know work during normal business hours, get interrupted constantly because they work on important projects with a lot of stakeholders, and get a lot of work done anyway. That's what 99% of engineers should aspire to. There are very few rockstars like Carmack who are so good that the benefits of their crazy work styles outweigh the drawbacks.