I noodled with my ‘cutout’ settings in developer options and had this sort of thing happen. Even if you don’t have a punch hole camera on the pixel 4 (I honestly don’t remember if it does), if your version of Android has settings for this, it can render the UI above or below the specified viewing area.
I know this is the nav bar though, but it’s worth a shot.