There's one easy part of your situation, which is that your immediate next step is clear. I think it's clear because it sounds like the two of you have a fundamental disagreement about how to choose a direction. There's also a power imbalance if you've consistently been going along with pivots that you don't want to execute on. If you think you can resolve things, then maybe I'm wrong. I'm basing my advice on the fact that this is 24 months in — enough time for you to know how easy it'd be to get back to "we like working together and are on a path to success."
Now for the hard parts: * You want to act as professionally as possible in walking away. Communicate clearly, being fair to both yourself and the other people involved. I think it's easy to err to far on either side (either too defensive/passive "nice to yourself" or too deferential "nice to others"). * It can be tempting to think of this is as your cofounder's fault, but that's not constructive, and it's better to learn toward your future actions. For example, how could you have seen this problem earlier? My guess is that you were never "cofounder compatible," and this is a chance to get better at identifying that compatibility with others (useful for both startups and other jobs).
It's not a fun situation, and I hope things go well for you.