Stand up and walk around periodically when you’re writing. Stretch or go outside for a breath of fresh air. This will clear your mind and help you refocus when you sit back down again.
It’s amazing what a little blood flow can do for your creative process! I like to walk my dog, stretch and sometimes go for a jog between chapters.