I find I have the opposite problem. I zone out coding and 3 hours go by and I haven’t taken a break, walked around, or even had a drink of water. I think remaining focused is a mixture of a couple things: low/no BS work culture, low meetings/distractions, and ownership over code. I think having ownership leads to wanting to make improvements more often, which makes me more motivated to work more. Really, I should be more strict about taking breaks. It’s better for your health in the long term.