Actually you can grab all the gold, and escape, while trapping Elija in the vault without cheating. You have to exploit the AI's general stupidity, and a game mechanic. Grab all the gold, drop it next to the vault door, talk to Elija, then grab the gold again, walk toward the holographic barrier that Elija will come through. Before he gets too close, drop the gold on the ground and hide. If you have a stealth boy, you can just sit some two feet away, wait for Elija to step over the gold, before grabbing the loot and high tailing it through the door.
If you don't have a stealth boy, then you need to just duck out of the way until Elija moves toward the computer, then you make a run for the gold, grab it, and make the agonizingly slow walk toward the elevator. I suggest saving before you start any of this because it might take more than one try to get the timing right.
That may work but the way I did it(got every gold bar there is)
1) Using a stealthboy(with all the gold bars and ammo you want)
2)Hide behind the generator (the one -----> right of the vault entrance)
3)When father Elija approaches the generator(turn 180 degrees around the generator so your out of sight from him)
4)Then you can make(remember,your overweighted so it may take a few trys) your way to the exit and you'll escape with all the gold,ammo, gun,and etc you want.
5)Once your back into the BoS bunker, store all your equipment in the storage locker by the entrance.(all I did was bring all the gold I can carry back to the Lucky 38 and kept it in a desk) and repeat until you have all your gold back in safe storage back in the Lucky 38.(Unless you have the perk that allows fast travel while over weight.
6) You have about 300,000+ of caps value in those gold bars now =)