GUI: fix the maximized state when restoring geometry

This is a workaround for https://bugreports.qt-project.org/browse/QTBUG-30636.

Thanks to Thomas for comments.

BUG: 323715
REVIEW: 112182