OrvilleYertleson is correct about the factory process, but it is also used on commercial ammo, at least they do at factory I've done some work for.
FWIW, tests on freshly loaded ammo may not provide reliable results. The reason I mention this is I put a little nail polish on the primers of some hunting ammo a few years back, as the last step in the process. So they had been loaded for a little while (up to a couple of hours), but bubbles formed in the nail polish around the primers on a number of them. There was still positive air pressure bleeding out of the cartridges from the reloading process. Once that air pressure is gone, there's nothing to push out moisture trying to get in.
BTW, I now do the nail polish after seating the primers, just like the ammo factories do.