A few days ago, I was working on a small application for some people at Work. Part way into the project, I went out briefly on an errand.
Driving down the street, I suddenly realized that I could (and should) make a simple change to the user interface that would result in less risky code as well as a better experience for the users.
When I returned to my desk, the first thing I saw was that two forms on the same page had the same name. Oops. That's not going to work. I renamed one and the JS code worked as planned.
When you're in the middle of a problem, it can be difficult to step away. Your brain wants to Solve This Thing Right Now. But many times, stepping away is just what is needed.