I have the power settings set to NOT restart when the power is plugged in and NOT to go into sleep mode.
Even with these settings the laptop restarts randomly. I'll be writing code and it restarts. Its random.
Surface Laptop 3 15"
AMD Ryzen 7 Microsoft Surface Edition 2.30 GHz
16.0 GB RAM