Hi,
FYI usually a pc is shutting down by itself, in order to protect critical hardware components ie. overheating issues, fan issues.
I still think that your issue is hardware related, you can scan your pc with about 50 different AV's they won't be able to cure any hardware damage.
What are your system temperatures, CPU & GPU??
Thanks.
Regards,