I am experiencing a similar issue. I have a UIKit MapViewController() where I declare a UIHostingOrnament. This is one view of a SwiftUI TabView. I have the below code in my viewIsAppearing.
#if os(visionOS)
mapView = MKMapView(frame: CGRect(x: 0, y: 0, width: view.frame.width, height: view.frame.height))
let ornament = UIHostingOrnament(sceneAnchor: .bottom, contentAlignment: .center) {
ToolbarView()
.glassBackgroundEffect()
}
self.ornaments = [ornament]
#else
Do other stuff here
#endif
When I select the tab for the Map View the first time, I see the ornament at the bottom, but when I select another tab and then select the Map tab, the ornament has disappeared. I can see that the viewIsAppearing is executing every time I click on the Map tab.