Often you stop yourself in the middle of writing, shocked by what you've done yet again, some mistake or some wrong move. You may have done it multiple times by now, and you blame yourself for doing it yet again.
When you see something in your writing that needs improvement, it's the first step to getting where you want to be. It's part of the learning process. Be patient.
Only after you've seen the same misstep over and over again, will you be able to do something about it. One day. When you're ripe and ready.
Until then know that simply seeing it is a huge step forward. So pat yourself on the back, tell yourself "Good job!" and move on.