Recently, my Samsung Galaxy S9 has been restarting on its own, but only when I put the phone to sleep. For example, I can leave my phone viewing a photo for hours with no restarts, but a few seconds after I press the power button to turn off the screen, the phone will do one of three things most of the time: restart, turn off, or have a black screen with the notification light flashing blue.
Nothing I've tried has worked. I have tried clearing the cache partition and a factory reset, and I have checked that auto restart is turned off in settings. As an additional note: The phone's model number is SM-G960U1 (US Factory unlocked)