Thanks for the post.
Have you look at the level to add the overlay? Are you using oboveLabels or aboveRoads?
Place the overlay above map labels, shields, or point-of-interest icons but below annotations and 3D projections of buildings.
https://developer.apple.com/documentation/mapkit/mkoverlaylevel
I believe the default is aboveLabels? When you call mapView.addOverlays(_:), MapKit adds the overlays at the .aboveLabels level.
MapKit's 3D realistic elevation cannot depth-sort and render overlays above map labels. Because of this limitation, if you add any overlay at the .aboveLabels level, MapKit will instantly force the map's elevation style to .flat so it can render the overlay correctly.
To keep the realistic 3D elevation, you must explicitly add your overlays at the .aboveRoads level. MapKit is perfectly capable of draping polylines over 3D terrain as long as they are rendered below the labels.
mapView.addOverlays(polylines, level: .aboveRoads)
Let me know if that change makes the modification you are looking for.
Albert
Worldwide Developer Relations.