I've noticed that starting version 5.4 of the Map Viewer template fills the top notch and bottom "chin" areas on my iPhone 12, the area around the notch gets the custom background color and the map fills the whole bottom area. The older version of the app just had a black bar at the bottom and the status bar area is black as well, my custom app has the same behavior. I have been looking at the code for the newer version if Map Viewer, but I can't figure out how they got it to display in these areas.
I copied the code for detecting if a notch exists based on the device name, and tried setting a header Toolbar on the page with the height and topPadding set based on notchHeight like in the template's code. However, in my app the header still displays below the notch area.
Is there some other settings or special trick to get the app to fill these areas of the screen?