After saying I’m also having this issue, I figured it out. Your GPU is overheating. The heat sync inside only covers the CPU, so your GPU is exposed and basically on its own. My advice is to download Mac Fan Control, then set the censor to your GPU, and set the threshold for about 72 C. I’m actually considering modifying the casing to allow fresh air in. That’s the main design flaw with these models.
1) Expose the adhesive to extreme temperatures. I did this by transporting my iMac in my car, screen-down on a piece of cardboard on a cold February morning (in Chicago). When I went to pick up the iMac, the screen practically fell off the chassis. I would have been distraught by this if I hadn’t already planned this replacement. So it was a happy accident.
2) Remember to expell the residual power from the power supply by pushing the power button while the iMac is unplugged. This does NOT guarantee it’s safe to touch, but when I accidentally brushed the solder and exposed capacitors, I didn’t get shocked.