I can open a new window, but if I close it using the window\'s close button then my app crashes.
import SwiftUI struct ContentView: View { var body: some