Over the past few years, I've seen this research study from around a decade ago being posted all over society media and also on Reddit. According to the study, men are far more likely to leave their wives if the wives are unwell with a serious illness. On the other hand, the study shows that women are likely to stay with their husbands during such times. Some people said that corrections were later made to the methodology, but even after the changes, the researchers concluded that the original conclusion was accurate, but the gap wasn't as wide.

https://www.sciencedaily.com/releases/2009/11/091110105401.htm

People on here seem to have the opposite view though and, in my personal experience, men and women both do this as much as each other.