The team at the Android Open Source Project is working on a feature called “hibernation”, which will reduce the memory footprint of apps you are not using. This feature is still in the early stages of development, but may be included in Android 12 (no official release date, but the Developer Preview of Android 11 came out in February 2020). What’s hibernation, anyway? Well, if a single user of a multi-user device chooses to hibernate an app, the app cache associated with that user will be cleared, freeing up a bit of space. That is already implemented. The more interesting question...
Source: https://www.gsmarena.com/androids_upcoming_hibernation_feature_will_reduce_the_size_of_apps_you_are_not_using-news-47267.php