You’re not alone in that! Truthfully, I have a “bad habit” of editing AS I write. In some ways, not so bad, since I catch a lot of mistakes as I go. But it does mean I have a tendency to get stuck on some scenes until I have to just tell myself to keep writing ahead, and I’ll swing back around to it later. LOL
Something I have found that helps, though, is having separate tools for editing and writing. For me, that’s using Dabble for Drafting and Scrivener for editing, but I’ve also done hand-written for writing and typing for editing, just something to cause enough of a divide that it helps me flip that switch. Maybe that’ll help with the 404 error!