AFAICS, it still spuriously succeeds (or fails depending on how you see it), as it depends on how fast the windows are created and the focus events received and processed.
Maybe this means that we should instead wait until the window get focus right after they are created in winex11 instead of trying to return early and hope to keep things consistent afterwards.