Had the same problem. Shutting down randomly while on battery power. I bought originally from BestBuy. After setting up the device I started noticing the problem , it then became clear this was not a 1 time deal. I looked into it on the web and noticed this
and other forums with users having the same issue. I contacted Microsoft Tech support, although nice and courteous could not fix using a remote connection , updates etc. He recommended contacting BestBuy since it was still under return window, but assured
me that if the period closed Microsoft would take it back. I contacted Bestbuy and a Geeksquad tech guided me and ran a diagnostic software remotely , it fixed some other issues but still could not find a fix for the shutdown. He did setup an appointment at
the store with GeekSquad. After showing to the appointment I explained all the issues interaction with Microsoft support and GeekSquad support couldn't fix it, he just offered to replace or refund. I did opt for a replacement.
The new device is working without problems.
Recommendations : If you notice this problem , call tech support immediately, if not fixable exchange ASAP.
Hope this helps.
I think I read somewhere it might have to do with faulty connection of battery at the manufacturing level, so if you have this problem the device is defective and need replacement.