Set the Power button action to do nothing, also set the Sleep button action to do nothing. Then, observe if the device would shut down or restart automatically.
Power Options, Advanced settings
Power button action Shut down change to Do nothing
Sleep button action Sleep change to Do nothing
Sleep, Allow hybrid sleep Setting: On change to Stetting: Off
ran powercfg.exe /hibernate off