Issue with rendering on Android Pie phones with cutout

Ok, time to answer my own question. If you happen to have this issue carefully read this article: https://developer.android.com/guide/topics/display-cutout/
The issue I described is actually the default behavior for phones with cutout! The fix is to change the LayoutInDisplayCutoutMode attribute.