returnValue should be set to a truthy value
The Chrome fallback at https://github.com/jacobbuck/react-beforeunload/blob/a271f7a01f9fd5309d9f859f5e805c9c3c8ba28c/src/useBeforeunload.js#L34 sets event.returnValue to an empty string. However, the confirmation dialog should only be shown when the value is truthy despite Chrome not following this part of the API:
https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event
While Chrome 119 and newer respects event.preventDefault() in beforeunload handlers, it'd be good to avoid using the API in an incorrect way and just set the value to a truthy one, e.g. 'true'.
Good to know Blink/Chrome has fixed their implementation. I'll remove the fallback in a future version now that it's no longer needed.