I recently found an issue in my bottom sheet that, when I added a isAtLeast(Lifecycle.State.STARTED) check on fragment lifecycle, that it was giving true for android version >= 13 but false for <= 12, these checks were performed when I press back from the image picker activity provided by android
fragmentManager -> activity.supportFragmentManager
fun DialogFragment.showSafely(fragmentManager: FragmentManager, tag: String? = null) {
if (fragmentManager.isStateSaved) return
show(fragmentManager, tag)
}
Didn't found the root cause for this issue in different android version.