dismissWindow alternative for macOS 13?

Currently for my SwiftUI application i'm using dismissWindow() to close my windows. However, I want to make my app compatible on macOS 13 to enable a wider audience.

My current usage of this function is as follows:

func reloadContentViewAfterDelete() {
    @Environment(\.openWindow) var openWindow
    @Environment(\.dismissWindow) var dismissWindow
    
    dismissWindow(id: "content")
    openWindow(id: "content")
}

@CheeryCode PresentationMode was the API available you would need to use from macOS 10.15–15.1, keep in mind that it has been deprecated now.

dismissWindow alternative for macOS 13?
 
 
Q