MacCatalyst Scene Frame needs adjustment

I don't know why, but for my MacCatalyst target, I have to make my view controller Y orgin 36 and the subtract the view height by 36 points, or the view is clipped.

The following works in my main UIViewController, but feels super hacky. I'd feel better if I understood the issue and addressed it properly.

override func viewWillLayoutSubviews() {
    super.viewWillLayoutSubviews()
    #if targetEnvironment(macCatalyst)
    if view.frame.origin.y < 1 {
        let f = UIApplication.shared.sceneBounds
        let newFrame = CGRect(x: 0.0, y: 36, width: f.size.width, height: f.size.height - 36)
        self.view.frame = newFrame
    }
    #endif
}

My guess is it starts the view under the title bar, but I have these set in the view controller:

self.extendedLayoutIncludesOpaqueBars = false
self.edgesForExtendedLayout = []

Realistically usage of the edgesForExtendedLayout and extendedLayoutIncludesOpaqueBars properties are discouraged, as they often don't work with newer UI requirements. If you modify your layout to respect the safeAreaInsets or use the safeAreaLayoutGuide with auto layout, then you shouldn't need to do this (which is also discouraged, as the frame of view is logically owned by its superview, which performs the layout for that view).

MacCatalyst Scene Frame needs adjustment
 
 
Q