The usual work list:
1. Current BIOS.
2. Try another PSU, be sure it's single rail or very beefy dual rails.
New PC builders forget or don't know about rails so a single rail avoids this issue.
3. Ask the motherboard maker if it needs swapped out.
4. General assembly errors. Too many mounting posts, heat buildup on chips that don't have temperature monitoring.
I have a really weird issue with my computer completely powering down. It's behavior is easy to replicate and is very bizarre.
My computer boots fine, and generally stays fine until I launch a game for the first time. The game will run for a few minutes and then the computer powers down with no blue screen or anything.
It will automatically start trying to power up (sometimes this takes a few 'clicks' to get going). If I immediately launch the game I can continue to play for as long as I please.
Once I exit the game, after a few minutes the computer will completely turn off again. To add on to this - if I return to a main menu after some graphically intense gaming and remain on the menu too long, it will turn off.
I am so confused. This has nothing to do with temps. The build is pretty new. It just seems so strange to me that the computer will run fine as long as I am either currently playing a game and have been for a while, or not playing anything at all. Anyone heard of this happening?
Build:
i9 9900K @ stock clocks
EVGA GTX 1070 SC @stock clocks (this part is the oldest, it was from my last build)
ASUS Maximus Hero XI
EVGA Supernova 1000 T2 PSU
16 GB Corsair Vengeance
Multiple SSDs.
I've tried fresh OS install, drivers etc.

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic