MacBook Air 2015 Shuts Down in Boot Camp Randomly
The quick answer is that when a battery starts to fail (due to age or just failure), the voltage can fluctuate to the point where the system cannot log an error or go to sleep. Since you have some evidence that this happens on battery alone, you'll need to collect enough data to prove that hypothesis or replace the battery and see if it helps.

You might also ask a pointed/specific question on out partner site superuser.com to ask if your specific version of windows can log low voltage errors or how to diagnose a sudden shutdown cause from the windows side of things.

I have diagnosed these things and ruled out other causes on the OS X side, but I cannot begin to advise you on how to read the windows logs and nothing that I know of is saved to Apple's NVRAM if windows crashes while it's running - but I could be proven wrong on that point by someone with that knowledge if they decide to weigh in :-)