It's unclear what is happening. Perhaps Windows is trying to just reshow the buffer and its clear or invalid (incompatible with new screen configuration).
Some tracing may help. Is Scintilla receiving a WM_PAINT? Is that paint failing in a way that can be detected like EndDraw returning D2DERR_RECREATE_TARGET?
It may be possible to produce a work-around like posting a message to perform a redraw after screen saver has ended. Couldn't find a screen saver ended event but there is WM_SYSCOMMAND with SC_SCREENSAVE for start of screen saver.
Neil