Migration from Vaadin 14 to Vaadin 22

Hi! We recently switched to Vaadin 22 and noticed that the PageConfigurator interface is now deprecated.
The Project used PageConfigurator to notify when a user closed the browser tab with a JS window event and a client callable method.

What would be the way to achieve the same result using newer Vaadin Versions?

We managed to fix the issue using BeaconHandler as shown here https://cookbook.vaadin.com/notice-closed