In a single screen environment the QWidget::restoreGeometry restores a Window to a position not visible. (See example and qtdiag.txt)
( Related to https://bugreports.qt.io/browse/QTBUG-76912 )
There seems to be a bug that some Widgets (sometimes) are moved incorrectly on screen change (when it goes to sleep or another computer starts using the screen). That is pretty bad, but what is even more annoying is that the dialog saves geometry and it will not be shown on next restore (unless the screen is attached, but it may not be - and if it just was a laptop that rarely is connected to a screen that is pretty bad).
The attached example contains data from 5.12.4, and it does work on 5.9.4 though that may be due the version (as it bails out restore), but in 5.9.4 I haven't experienced similar problems where the dialog got hidden and was restored hidden.