macosx: fix race condition which caused hiding the main split view (close #11103)