below gives an interesting view on all this
https://web.dev/bfcache/?utm_source=lighthouse&utm_medium=lr#never-use-the-unload-event
Never use the unload event #
The most important way to optimize for bfcache in all browsers is to never use the unload event. Ever!
The unload event is problematic for browsers because it predates bfcache and many pages on the internet operate under the (reasonable) assumption that a page will not continue to exist after the unload event has fired. This presents a challenge because many of those pages were also built with the assumption that the unload event would fire any time a user is navigating away, which is no longer true (and hasn't been true for a long time).
So browsers are faced with a dilemma, they have to choose between something that can improve the user experience—but might also risk breaking the page.
On desktop, Chrome and Firefox have chosen to make pages ineligible for bfcache if they add an unload listener, which is less risky but also disqualifies a lot of pages. Safari will attempt to cache some pages with an unload event listener, but to reduce potential breakage it will not run the unload event when a user is navigating away, which makes the event very unreliable.