The original issue on Qt 6.7 was caused by conflicts with the window state set in main.qml
which was addressed by afbc49e39a.
The remaining issue with Qt 6.7 clobbering window state and position when hiding a window
looks like a legitimate Qt bug.
This reverts commit ebe270bec5.