This is the best solution for macOS 13 or earlier if we want to open a new window in a SwiftUI macOS app. Thanks for your sharing and I get a lot from your professional answer. For macOS 13 and later, we can use openWindow method to solve this problem more elegantly.