Fixed behavior of BrowserWindow.maximize on macOS for not shown windows. #34365 (Also in 15, 16, 17, 18)