Continous Restarts
My iMac has a problem. Whenever left unattended for approximately 20-30 minutes it shuts down any open applications and restarts. This happens with Big Sur and with the previous OS. At times I'll come back to find the attached images which indicate the shut down was requested, which it obviously wasn't. The only ways I've found to keep it from happening is to play songs in Apple Music continuously or, if I happen to catch it before it completes the shut down, to open another application.
My computer is the 21.5" 4K iMac with 8G of RAM (Yeah, I know). Does anyone have any idea what's causing this and how to stop it?
Thanks in advance.
iMac 21.5″ 4K, macOS 11.0