I’ve read from a lot of published authors that finishing the story first then editing and rewriting it is the way to go. Kind of like a sculpture that needs to be refined as you go along for all the intricate details, but everyone’s writing process is different.
I would rather edit chapter by chapter as I go along so I don't have to edit for one long extended period. Think of it like eating a horizontally filled burrito. If you take a bite, you're going to get mostly sour cream before even reaching the beans. Picture for reference:
You can at least try and change your approach temporarily, since right now you are less productive and Instead of writing, I've been editing, rewriting, deleting, adding, so many other things that take up the time of actually progressing the story. But you do you.