As my iMac Retina 27” 2014 with AMD Radeon R9 M295X 4096 MB startet to suddenly switch off the screen, especially while playing a full screen game, I started to look for the cause and a solution.
Thinking it might has to do with temperature I started to research. The black out doesn’t seems to have to do with cpu %. To search further I installed https://bjango.com/mac/istatmenus/ and found out, that the screen turns off when the GPU Die temperatur climbs around 100 °C. So what to do against that? Next was to install TG Pro an App you can use to manually (or automatically) turn on the fan.
And: Bingo! As I started to start the fan and cool down the GPU Die, the iMac stopped shutting down the Screen.