Wait for the main window to have its size set before restoring dialogs. Only that way vertically stacked docked dialogs will be properly restored:
This MR needs cross-platform test.