Either that, or they use addEventListener("beforeunload", ...), which emptying window.onbeforeunload does not remove.Have you tried, maybe, to assign window.onbeforeunload a function that only calls event.stopImmediatePropagation()?
I am not sure, though, which listener is called first (the window.onbeforeunload or the addEventListener one), or whether this method actually prevent other listeners from being called, so this might now work at all.
Oh, this is probably an overkill, but you might want to addEventListener at document_start (with an always applied content script) that will do whatever you choose to do afterward (event.stopImmediatePropagation() or nothing).