Same, it is very hard to do lots of small tasks related to managing the company or very small bugs fixes / tests, and then deep dive / being in the flow for hours for coding..
I try to select 1-3 main objectives for the week and then chunk the work I need to do into things that require being in a more extraverted mode of talking with folks vs more introverted deep dives.
E.g. on the day I did this podcast recording, I did user conversations bc I was in talking to folks mode.
On other days, the focus will be more writing focused - user insights / roadmap priorities / code.
I came up with a method that has helped me devote a whole day to a given task without neglecting other necessary tasks for too long: https://didgets.substack.com/p/shortcuts