osx: keep window creation on-screen during display reconfiguration (#21543)