In a SwiftUI VisionOS app that opens with one .plain window and another .volumetric window, I want to automatically close the Volume when the user closes the plain window. Attempting to do so with
ContentView().onDisappear{ dismissWindow(id: kVolumeId) }
results in
Page tried to end immersive session initiated by a different page
I have not found that error documented anywhere. Any advice?