how to make activity to not act as a controller in Android MVVM?

so in MVVM architecture even in google samples we can see things like this:

class CharacterListActivity :BaseActivity() {
    
    val ViewModel: MainViewModel 

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        viewModel.getData()   // Bad!!!
        ...
        viewModel.state.observe(this) { state ->
            when(state) {
                Success -> { navigatetoNextPage() }    // Bad!!!
                Progress -> { showProgress() }         // Bad!!!
                NetworkError -> { ShowSnackbar(viewModel.error) }   // Bad!!!
                Error -> { showErrorDialog(viewModel.error)         // Bad!!!
            }
    }

here, since activity decides what to do with the state, the activity works as Controller but in MVVM, activity supposed to be the View. the activity even tells the ViewModel to get data. this is again not the View's job. the View is supposed to just tell the ViewModel about events like onClick(). and since ViewModel doesn't have access to View, it can't show a dialog or navigate through the app directly!

so what is an alternative good way to do this which does not break any MVVM rules?

For The Record I'm not mixing Up mvc and mvvm, I'm saying that this pattern which is recommended buy google does. I can name the violations in this code one by one for you:

1) UI is not responsible for getting data, UI just needs to tell ViewModel about events.

2) UI is not responsible for handling state which is exactly what it does here. more general, UI shouldn't contain any non-UI logic.

2) UI is not responsible for navigating between screens