Extended from the question in https://stackoverflow.com/a/62476194/14355301, the view moel will be still there after the view dismissed. Answer show to use onDismiss to hand