In macOS, the panel type browser window is NSWindow type, not NSPanel. Calling some private API at runtime makes NSWindow look like NSPanel, but not 100% like NSPanel. (I found this in the Electron source code.)