So as we know these methods will be called when orientation change in Activity.
onPause() -> onSaveInstanceState() -> onStop() -> onDestroy() -> onCreate() -> onStart() -> onRestoreInstanceState() -> onResume()
So we can see the onDestroy() method is called.
If the ViewModel() is lifecycle aware then how come the viewmodel is not cleared and preserving the data?