It's a shame when resigning is the only way out. Before reaching that point, the usual strategies should be attempted:
Picking your battles;
Negotiate rather than fight;
Be better at analytics and research than anyone else. So you have the data to measure or predict success about a particular feature or direction.
Armed with your data, you must carefully communicate findings without shaming others.
It's a fine line between fostering a positive work environment in the face of misguided decisions, and being condescending or derisive towards other team members. There is no silver bullet, but a touch of self-deprecating humour never hurt. If you advice isn't taken, you'll have a non-snarky receipt. Any email written with an irritated tone, will look twice as bad months later.
I did create benchmarks and simulated impact following different scenarios (including the one I was advocating for). Unfortunately that was received in deaf ears. Even worse, actually; they thought I was being too pushy by adding the scenario I was proposing to the analysis. At this point I knew I had to leave.