The issue persist in Android 13 more, actually it create multiple instance of the activity, so the easiest solution for the same is managing the savedInstanceState
in OnCreate
method of the activity.
if(savedInstanceState != null){
return;
}