As I observed it seems that the fragment backstack is not retained after process death.
So if I kill my app by putting it to background and call am kill <app>
it does not recreate the fragment backstack if i take the app to foreground again.
This seems to be the case with both - using Jetpack Navigation Components
and using supportfragmantmanager
with addToBackStack
After Orientation change everything works as expected. So I don't know whether the backstack is always cleared after process death and cannot be retained or if there have to be some extra steps done to retain the backstack.