I definitely am doing a Safari App Extension (the modern one), but when I include the code you pasted, SFSafariApplication.getActiveWindow never enters the completionHandler, so nothing happens, similar top my initial question with openWindow() .
The fact is that SFSafariApplication.showPreferencesForExtension works but SFSafariApplication.openWindow doesn't. If I could figure why, I am pretty sure I would be able to fix it (manifest, plist, extension ids, signing, safari settings, something)