I suspect that vm.setLoading(false) immediately executed if uiState.data is empty.
Replace
vm.setLoading(false)
on
if(uiState.data.isNotEmpty())
{
vm.setLoading(false)
}
The example using LiveData for a view state and CircularProgressIndicator: https://github.com/kl-demo/mvvm-compose-hilt-example/blob/main/app/src/main/java/kldemo/mvvmcomposehiltexample/presentation/langs/ProgrammingLanguagesScreenScreen.kt#L66