
The code previously used was only working with the patched Sentry method, not when Sentry was inactive. Since a Websocket is inheriting from EventTarget, the method signature usually requires two arguments. See https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener