There can be mitigating circumstances that could warrant staying, but mostly I have to agree with you. Either fight to turn things around or avoid being stained by the inevitable failure.
The worst thing about staying to turn things around is that often the failure is set up from the beginning by those in leadership. Your reward for working your ass off to make the project succeed is probably going to be to make someone look good who was responsible for digging the hole that you helped to pull everything out of.
Unless the game board is set up so that you benefit heavily from your hard work (equity, bonuses rewarding the risk and effort) - there's little upside to killing yourself besides some opportunity for personal growth.
The worst thing about staying to turn things around is that often the failure is set up from the beginning by those in leadership. Your reward for working your ass off to make the project succeed is probably going to be to make someone look good who was responsible for digging the hole that you helped to pull everything out of.
Unless the game board is set up so that you benefit heavily from your hard work (equity, bonuses rewarding the risk and effort) - there's little upside to killing yourself besides some opportunity for personal growth.