Depression is caused by more than just external events. Yes, based on personal experience, but there are more factors to be considered and fixing one issue may not solve the problem.
"Rather, depression has many possible causes, including faulty mood regulation by the brain, genetic vulnerability, stressful life events, medications, and medical problems."[0](https://www.health.harvard.edu/mind-and-mood/what-causes-dep...)