macOS 14.0 Sheet not interacting out of MenuBarExtra (Application is agent)

Hi everyone, i'm challenging a problem with interacting with a sheet under new macOS Version Sonoma (14.0). I set Application is agent (UIElement) to YES for only having the menuBar-Application. When opening a sheet out of the MenuBar and interacting with any type of input (TextField), the sheet ignores all following inputs by key and mouse.

Does anyone have a solution for this problem?


struct ContentView: View {
    @State private var vm = TestViewModel()
    
    var body: some View {
        VStack {
            Button("Open Sheet") {
                vm.showSheet = true
            }
            .sheet(isPresented: $vm.showSheet) {
                VStack {
                    TextField("Text", text: $vm.text)
                    Button("Close Sheet") {
                        vm.showSheet = false
                    }
                }
                .frame(width: 300, height: 200)
            }
        }
        .padding()
    }
}

@Observable
class TestViewModel {
    var showSheet = false
    var text = ""
}

I'm experiencing the exact same issue. My MenuBar worked on MacOS 13.2 (Ventura) but after upgrading to Sonoma, clicking on the sheet collapses the contentview in the app.

Same thing with .alert

macOS 14.0 Sheet not interacting out of MenuBarExtra (Application is agent)
 
 
Q