I play on PC, but anytime I hear that a device powered off in the middle of a game, 2 primary causes come to mind. Either power delivery is failing, or the CPU is overheating. In modern PC's though overheating would just cause the CPU to throttle down. One thing I would try though is to look at where your PS5 is physically sitting. Does it have good airflow around it? Is it sitting fairly enclosed or in a cramped location with poor airflow? Just as a test, maybe move it to a more open spot and put a desk fan on low aimed at it just to see if you can tell if heat is a factor. Something Turning off on its own is either going into some damage preventative mode, or power delivery is failing. When I have worked on PC's that are dieing on their own like this it sometimes turns out, for example, to be that the powersupply is going bad. A device just powering off though will typically be some type of hardware reaction or failure.