Oh welcome to my world - plot holes drive me completely mental.
I try to eliminate as many as possible when I’m in the planning stages, by asking lots of How and Why questions as I’m getting the bones down.
For instance, I have a character that walks out of a mirror into a room in an enchanted castle.
Questions have included:
How often can she do this? What happens to the mirror when she’s not there? Is it her magic, or the mirrors’, that makes this possible? If it only happens one day a month, why isn’t it possible other days of the month? Why does she need to use the mirror as transport between places, if she has magic anyway? Can anyone step through the mirror? Who created the mirror? What happens to the mirror at the end of the story? Where does she go when she steps back - what’s on the other side of the mirror?
And so on and so on. For pages.
Many of these facts won’t feature in the story, but they stop me having as many plot holes as I would have if they weren’t answered.
For the plot holes that sneak through (the little devils!), I just worry it like a dog with a bone, (writing and answering lots and lots of those questions) until I’ve found an answer.
Yes, it does often make me have to rewrite. But also yes, the rewritten version is frequently better than the original.
And now I’m aware that folks reading this have got an insight into how my brain works, and are shaking their heads, going, ‘sooo many things about VH make sense now. She just plain nuts’.