How do I hide a window when a second window is displayed

I have a swift program that uses multiple window groups. The Content View consists of a series of buttons whose action are to run "openWindow(id: xyz)" each which opens a second window. It all works fine. What I would like to be able to do when a second window is selected have Content View be no longer visible on the screen and then when the second window is dismissed have the Content View reappear. Below is my program App struct.

@main
struct WindowGroupsApp: App {
    var body: some Scene {
        WindowGroup ("Home") {
            ContentView()
                .hostingWindowPosition(window: "Home")
        }
        Window("Summary", id: "summary") {
            SummaryView()
                .hostingWindowPosition(window: "Summary")
        }
        WindowGroup ("Table", id: "table", for: String.self) { $fundName in
            NavigationDestinationView(fundName: fundName!, numYears: 1)
                .hostingWindowPosition(window: "Table")
        }
        WindowGroup ("Chart", id: "chart1", for: String.self) { $fundName in
            CustomChartView(fundName: fundName!, numYears: 1)
                .hostingWindowPosition(window: "Chart")
        }
        WindowGroup ("Chart", id: "chart5", for: String.self) { $fundName in
            CustomChartView(fundName: fundName!, numYears: 5)
                .hostingWindowPosition(window: "Chart")
        }
    }
}