What are things you can do to insure your plot doesn't have hole while you're writing after you wrote the plot? Is there some kind of trick or tip to insure that after the plot is written, the subplot or parts of the plot doesn't cause some kind of plot hole down the road?
There are any number of times and places to discover and deal with plot holes.
First, you mentioned writing out the whole plot before writing the story. This is a good way to make sure it all makes sense.
But sometimes, you get to the big twist and as part of your research you discover your big twist actually would not work. Those institutions have a 3 year waiting list, or you have to agree to be nominated for that award so you couldn't be surprised with a win, or whatever. This is where your second approach comes in. You're the writer, fix the hole. Invent a different award where you don't have to consent to being nominated. Go back to Chapter 2 and have the character join the actors union grumpily just because they want to be able to walk in and out of their office where a movie is filming outside. This feels at the time like you just included it to show the character's personality or to contrast them with someone who didn't -- but then the union card in their pocket fixes what would have been a plot hole in Chapter 22.
Or, take a third approach - no-one is going to notice with all these bombs going off! Sometimes after I finish a book I slowly become aware that the Big Thing couldn't have actually worked that way, but I didn't notice during the action packed climax because there was so much going on. I forgive these books for that.
The fourth approach is to lampshade it. Have one character tell another that normally, [reason the thing they're doing could never happen], so it's amazing that [the pandemic, the election, the lottery, whatever] made it different this year. And then just carry right on.
If your characters, your setting, all the rest of your plot, and so on are all delightful, only a tiny handful of people are going to spot small holes. You plan in advance to minimize them, you go back and add stuff earlier to prevent them, you invent similar-but-not-the-same scenarios to which the plot hole doesn't apply, or you breeze right past it and hope it doesn't matter in the end. Lots of choices.
Alpha and Beta Readers:
No, there is no magic formula as you are composing a story to be sure you have exposed all the possible plot holes that may disrupt internal logic. But what you can do is mobilize the resource of another brain to look at the plot and say, "Huh? Didn't you say Rupert was going to die of thirst in the desert in chapter 3?"
Sometimes you can get so fixated on your beautiful scenes or stories, and the sheer poignant agony of what is happening to the characters, that you lose track of stuff. A new set of eyes (and it sounds like you would benefit most from an alpha reader or even a co-author) will be able to back up and take the 10,000 foot view, exposing problems you can't see yourself. At the earliest stages, this person can even just be someone you bounce ideas off of to see if things make sense.
- A careful outline of the story won't solve the problem, but may make problems more apparent. Some people will write a timeline of what is happening to various characters, so if B happens before A, it gets noticed in a story where A-B-C happens in order.
But in the end, nothing beats another set of eyes to notice when something smells fishy. Wait, I thought this story was in a desert. WHERE DID THE FISH COME FROM?!!??
I don't think there's any magic trick. I think it's just, Read back over your story looking for plot holes. Get others to read your story and tell you if they see any plot holes.
As others have noted, sometimes you can get away with plot holes. I've read or watched plenty of stories where the hero does impossible things. If it comes across as, "Wow, isn't it cool that the hero can do all these amazing things? Wink, wink.", that can be a great story. But if it's presented as if this was totally plausible, and the reader can easily see that it's not plausible at all, the story is going to fail.