Interestingly, there are more use cases for hysteresis in UI design, e.g. it was famously used in nested menus in Windows: https://www.mackido.com/Interface/hysteresis.html
I think there was also an article about it on The Old New Thing, but I can't seem to find it anymore.