Dependencies downloading multiple times across IDEs for Android

We have a flutter project and we build the app by using flutter build command which builds the entire project and artifact is produced. We use VSCode for app development but it shouldn’t matter.

This means all the dependencies required for the building the android project is already downloaded. I opened the project in Android Studio today and it took 32 minutes to sync the project where it downloaded the dependencies all over again. Why?

Any help would be appreciated.