UI Disappears after Ctrl+alt+del (and various other instances) [5.2.1f1]

Completed reproducible with Ctrl+alt+del on Windows 7, some other instances also cause this problem, but not easy to reproduce.

Every time this happens, I get the error: “GUI Window tries to begin rendering while something else has not finished rendering! Either you have a recursive OnGUI rendering, or previous OnGUI did not clean up properly.” after a couple of “Skipped frame because GfxDevice is in invalid state (device lost)” messages.

The UI that I have built in the window completely disappears, but the rest of the game is responsive.

Occasionally I can bring back the UI by drawing something new to the canvas, but that’s a 50/50 shot.

After a lot of research, I found that this is a glitch that is present with the “new” UI system and DirectX9.
Switching from DX9 to OpenGL or DX11allows the computer to be locked, and the UI to stay visible.

I haven’t found a workaround for DX9 yet though, as it seems like the update scripts on the drawing monobehaviours just stop.