Well this is a genuine ClusterF....
Maybe the battery acid poured out of the last good battery due to the angle. I have had many batteries give up when the starter current hits them. Rainwater getting somewhere or other leaks like oil messing electrical up... Not where I would start.
Start with the basics. Check battery cables for being loose. Load test each battery. A shorted cell could brown out things. The passenger side battery runs hotter and generally fails first. Grounds need to be cleaned including the one by the ABS unit on the frame rail. Engine running what is the voltage - aka testing the alternator.
These years, assuming 2006-07, are known for ignition switches that are criminally negligent in design, quality, reliability, and function. ( Some other GM cars were recalled as the switches didn't even meet GM's low specifications. ) They use spring tension to close a contact that gets weak and allows the contacts to arc and burn. This causes a brownout. low voltage, to things it powers. This includes the airbags. Outright replace the ignition switch if you have checked the above and this ClusterF is intermittent. One of the few parts you just throw at something due to known intermittent failures. Delay doing so and you will agree with my take on the situation after awhile.
Failed under warranty GM ignition swith from these years. Contacts bent up to show failure. Intermitant random codes, airbag lights, stabletrack lights, AC INOP sometimes. See the burnt contact? The "pins" drop as the gear moves and depend on the strips to "spring" closed. Getting a spring hot weakens it's spring tension. Off-Acc-Run-Start is normal to start the engine. Well the accessories are "opened" in the start position to give all the power to the starter. So the Acc contact arcs on-off for a moment as you quickly go from off to start. Older designs were a forced "on" contact that didn't depend on spring tension or overcoming cold grease to move.
View attachment 63432