It's better to leave as long as that option is available to you.
There's so much I would do/have done differently if I had carte blanche, but it's not my startup, and no reason to think I would have done as well nevermind better, it's easy to judge from the position of not being bothered to go out on my own.
I'm certainly not going to be giving any seminars on mental health, but I don't think mine would have benefited from just abandoning anything I didn't completely agree with.
Not to suggest the actual advice you got and the way you mean it was as lacking nuance as that.
Not least because how have you helped the situation by leaving it anyway?
So I had to make the decision to leave. Turns out to be one of the best decisions I’ve made so far my in career.
― George Bernard Shaw, Man and Superman
What that management training course said is true only in a world without camaraderie, solidarity, and collegiality. I wonder if "out of step with the company" necessarily means your peers and colleagues, or shareholders and executives?
A society of constant, unthinking defectors, on the other hand, is unsustainable.
Isn't this also on you to maintain those relationships if they're people you care about? And on the same note, if you care about those people you can find ways to keep in touch, like starting a regular group activity.
Not many people are willing to put the effort in, in my experience. YMMV. I wish others more favorable outcomes.
AI replacing your job has to be experienced with a craned neck - from the front row.