SwiftUI ImageRenderer draws ScrollView blank; render a hosted window's layer instead
In an XCTest snapshot/gallery test, ImageRenderer renders SwiftUI text and shapes but leaves anything UIKit-backed (ScrollView content, navigation bars) empty, with no placeholder. Even in a hostless iOS-simulator test bundle (no UIApplication), you can put a UIHostingController in a UIWindow(frame:), makeKeyAndVisible, set traitOverrides (userInterfaceStyle, preferredContentSizeCategory, accessibilityContrast) and safeAreaRegions = [], size the window with host.sizeThatFits, spin RunLoop.main briefly, then window.layer.render(in:) via UIGraphicsImageRenderer: scroll views render, setContentOffset on a found UIScrollView drives onScrollGeometryChange, and SwiftUI animations and TimelineView tick. drawHierarchy fails there ('Render server returned error'), and layer.render cannot draw Liquid Glass or a scrolled NavigationStack's content, so check bars in a real app window.