Some platforms (like Meta) implement passthrough via an special compositor layer called the passthrough layer. This passthrough layer is only added to the list of layers for the compositor when in non immersive mode. This means that should not visible inside immersive experiences. However that was not true for some experiences like Moonrider.
In order to make it work properly we need to destroy that layer when entering immersive and recreate it (if needed) when getting back to standalone mode.
Some platforms (like Meta) implement passthrough via an special compositor layer called the passthrough layer. This passthrough layer is only added to the list of layers for the compositor when in non immersive mode. This means that should not visible inside immersive experiences. However that was not true for some experiences like Moonrider.
In order to make it work properly we need to destroy that layer when entering immersive and recreate it (if needed) when getting back to standalone mode.
Fixes #1351