It could be possibly the Android Studio Version you are using. I would recommend you to use the stable version of the Android Ladybug. Currently I'm using Android Studio Ladybug | 2024.2.1 and facing no such issue.
Android Studio Ladybug | 2024.2.1