We have an app that currently uses systemUiVisibility to toggle the SYSTEM_UI_FLAG_LIGHT_STATUS_BAR settings. As this is deprecated we want to move to using the new WindowCompat.setDecorFitsSystemWindows and windowInsetsControllerCompat.isAppearanceLightStatusBars instead. But we’ve hit a weird issue which seems to be a bug on API 28 — on API 29 we don't see the problem.
The app also has an OnApplyWindowInsetsListener on the root of our Activity layout to adjust for the IME being displayed, and between two of our Fragments we use shared element transitions. Putting all of these together seems somehow to break layout, such that the Fragment’s root view gets set to width/height of 0.
It’s the kind of thing that's easier to demonstrate than to explain, so I’ve made a very simple sample app to reproduce the issue, and put it on github.
Here’s an animation of what happens — when we should see the second fragment again, we see nothing:

