Stop when it's good
To write well, stop when it's good.
Bad writing is better than no writing. When you write bad stuff, that means you're putting reps in. Being critical about your work is ok, as long as you keep doing the work.
When we write well, we get complacent, excited. You cannot be in the flow and grow because, by definition, that's comfortable. If you write well, you can't improve.
In the gym, when a set is too easy, I have to step it up. It's that constant striving for perfection that drives our capacity to do great work.
Give yourself time to spot mistakes. Leave the bad writing and come back later to it. Edit it. Improve what you've done. But without any work, you cannot improve. So write bad, and when it's good, stop.