Starting with iOS 26, SwiftUI's UIHostingView may use CALayer-based rendering (caLayerSystem) instead of the traditional UIKit-based rendering (uikitSystem) when certain conditions are met. This can cause unexpected changes in the view hierarchy — for example, _UIGraphicsView and CGDrawingView subviews may be replaced by plain CALayer and CGDrawingLayer sublayers.
Here are two approaches to temporarily disable this behavior in your local debug environment.
Set the environment variable SWIFTUI_DISABLE_MIXED_VIEW_HIERARCHY=1 in your scheme's Run configuration (Edit Scheme → Run → Arguments → Environment Variables).