API Level 36 (Android 16) changes user experience of back button as described in Migration or opt-out required for predictive back.
You can either implement new predictive behavior or opt-out by setting in Android Manifest the attribute android:enableOnBackInvokedCallback to false. Note that the opt-out will become ineffective in a later API release.