2017 iMac 27in sleep/wake black screen issue

I am having an issue with sleep/wake where the computer will go to sleep but it will not come back after sleep. The screen is just black but the computer is on. I am also currently booting Bazzite from an external SSD plugged into the thunderbolt port.

This has also happened when loading some games from Steam. For example CS Source would start loading a server then screen would go black.

Specs:
Quad core intel Core i7
AMD Radeon Pro 580 8GB
64GB DDR4
1TB SSD
Was this page helpful?