I don't think those are cleanly separable. When you talk with people who left the industry, it's very rarely, "I was successful and engaged and really enjoying it, so I decided to switch to something entirely different where I had to start over and earn a lot less."
For a lot of people who experience discrimination, it's not one big blow-up that forces them out. It's the steady drip-drip-drip of being treated poorly, denied opportunities, etc. Eventually they just get worn down.