One of the wisest pieces of career advice I ever heard was "you cannot change an organization by leaving it." It works both ways: if you're leaving in hopes that it'll be a wake-up call to management that a valuable person left, then it probably won't be. And, if you leave your workplace to improve your own life, you've also necessarily chosen not to try and improve the workplace. Leaving means giving up on trying to…
This reminds me of Exit, Voice, and Loyalty by Albert Hirshchman [0]. The gist is that you have two options Voice or Exit. Voice means staying and fighting for things to change. It having any effect is predicated on the ability to Exit, to opt out of the situation and leave. Staying and fighting means you may push for change. But quitting and bringing others with you means that you may force change.
[0]: https://en.wikipedia.org/wiki/Exit%2C_Voice%2C_and_Loyalty