MKMapView not retaining state?

I have an extremely simple set up in which a MapKit resides within another view. I want the map to be able to be expanded into a fullScreenCover. The map properly shows up in ProfilePageView on initial load, and properly shows up in the fullScreenCover when expanded. However, when the fullScreenCover is exited the map is effectively totally gone (see image below). Clicking on the rectangle again properly sends it back to the fullScreenCover where it is displaying correctly.

I can force it to rerender by using a UUID key, but this seems like a hack and I don’t understand why it is necessary.

import Foundation
import SwiftUI
import UIKit
import MapKit

struct ProfilePageView: View {

    @State private var isMapExpanded: Bool = false

    @State private var mapView: MKMapView
    @State private var mapViewKey: UUID = UUID()

    init(countryNames: [String]) {

        // Initialize MKMapView with configuration
        let initialMapView = MKMapView()
        let initialLocation = CLLocationCoordinate2D(latitude: 33.9391, longitude: 67.7100)
        let regionRadius: CLLocationDistance = 6000000
        let coordinateRegion = MKCoordinateRegion(center: initialLocation, latitudinalMeters: regionRadius, longitudinalMeters: regionRadius)
        initialMapView.setRegion(coordinateRegion, animated: true)
        _mapView = State(initialValue: initialMapView)
        print("MKMapView initialized in init")
    }

    var body: some View {
        ScrollView {
                Divider()

                Button(action: {
                    isMapExpanded = true
                }) {
                    ZStack {
                        MapUserView(isMapLoading: .constant(false), mapView: mapView)
                            .id(mapViewKey)  // Use the key to force recreation
                            .frame(height: 425)
                            .cornerRadius(10)
                            .overlay(
                                RoundedRectangle(cornerRadius: 10)
                                    .stroke(Color.blue, lineWidth: 4)
                            )
                            .allowsHitTesting(false)

                        Rectangle()//
                            .foregroundColor(.clear)
                            .frame(height: 425)
                            .contentShape(Rectangle())
                    }
                }
                .buttonStyle(PlainButtonStyle())
                .fullScreenCover(isPresented: $isMapExpanded, onDismiss: {
                    print("FullScreenCover dismissed")
                    mapViewKey = UUID()  // *If this is commented it we get the above described image*
                }) {
                    MapUserFullScreenView(isPresented: $isMapExpanded, mapView: mapView)
                }

            Text("Here we are")

                
            }

        }
    }




struct MapUserFullScreenView: View {
    @Binding var isPresented: Bool
    var mapView: MKMapView
   

    var body: some View {
        ZStack(alignment: .topLeading) {
            MapUserView(isMapLoading: .constant(false), mapView: mapView)
                .edgesIgnoringSafeArea(.all)
            
            Button(action: {
                isPresented = false
            }) {
                Image(systemName: "xmark.circle.fill")
                    .padding()
                    .font(.largeTitle)
                    .foregroundColor(.white)
            }
            .edgesIgnoringSafeArea(.all)
        }
    }
}

struct ProfilePageView_Previews: PreviewProvider {
    static var previews: some View {
        let randomCountries = ["Brazil", "Colombia"]
      
        
        return ProfilePageView(countryNames: randomCountries)
    }
}

import SwiftUI
import MapKit
struct MapUserView: UIViewRepresentable {
    @Binding var isMapLoading: Bool
    
    var mapView: MKMapView

    func makeUIView(context: Context) -> MKMapView {
        print("UI has been made")
        // Ensure the map view is only configured once
        if mapView.delegate == nil {
            mapView.delegate = context.coordinator

        }
        return mapView
    }

    func updateUIView(_ mapView: MKMapView, context: Context) {
        print("updateUIView called")
        // Ensure the map view is not reset or cleared unintentionally
        if mapView.delegate == nil {
            mapView.delegate = context.coordinator
        }
    }

    func makeCoordinator() -> MapUserCoordinator {
        MapUserCoordinator(self)
    }

    class MapUserCoordinator: NSObject, MKMapViewDelegate {
        var parent: MapUserView
        
        private var cancellables = Set<AnyCancellable>()

        var dimmingView: UIView?

        init(_ parent: MapUserView) {
            self.parent = parent
            
            super.init()
        }

        func mapViewDidFinishLoadingMap(_ mapView: MKMapView) {
            parent.isMapLoading = false
        }
        
    }
}


struct MapUserView_Previews: PreviewProvider {
    static var previews: some View {

        return MapUserView(isMapLoading: .constant(false), mapView: MKMapView())
    }
}

Why is this UUID key necessary? Why isn’t @State properly ensuring the state of the mapview remains shared within the ProfilePageView and that of the value displayed in the fullScreenCover?

Note that I am passing mapView to MapUserView to enable the fullscreencover to display without requiring a full reload of the map information (I have stripped out a lot of the complex methodologies here to focus on the specific problem). Prior to passing this mapView, the button would cause the map to entirely reload before displaying and this would cause significant lag.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật