iOS Safari web extension - detect when user closes pop up

How can we detect when the user closes the pop-up in an iOS Safari web extension?

On macOS Safari 15.6.1 I am able to receive pagehide and visibilitychange events, but not on iOS 16.

iOS Safari web extension - detect when user closes pop up
 
 
Q