DocumentGroup opens an empty document on Mac Catalyst when the "Optimize for Mac" is checked

I am using a Mac Catalyst with SwiftUI for our document-based app with DocumentGroup. The issue is that when we create a new document or open an existing one, the opened view is completely blank. It is only blank/empty when the "Optimzie for Mac" is checked. If it is "Scaled t oMatch iPad", then it works well.

Xcode 16.1 macOS 15.1

struct DocumentGroupTestApp: App {
    
    var body: some Scene {
        DocumentGroup(newDocument: WritingAppDocument()) { file in
            TestView() // it is empty when it gets opened. It does not work if the option "Optimize for Mac" is checked. If it is scale iPad, then it works.
        }
    }
}

struct TestView: View {
    var body: some View {
        Text("Hello, World!")
    }
}

Could you please File a bug report using Feedback Assistant and include a focused sample project that reproduces the issue. Once you do please post the Feedback ID number here.

Thanks

DocumentGroup opens an empty document on Mac Catalyst when the "Optimize for Mac" is checked
 
 
Q