My laptop is connected to a USB-C dock. The power just went out for about 20 seconds as the power company replaced our meter. The laptop, despite having a healthy, fully-charged battery, shut down. When it booted back up, it didn't start my startup apps, and all my stuff from before the shutdown was closed. All I can think is a power spike hit the dock, and then the laptop, so it panicked and turned itself off. It doesn't make sense, but I don't know how else to explain it.