If you step back, in 1979 Iran launched a revolution that had an avowed goal of “death to America”. If the Iranians play the kinetic scenario to the bitter end, they simply are demonstrating this was not mere poetry and there never was any other off-ramp, just tactically deciding at what relative strength these two systems will collide.
So Iran loses by demonstrating irrational resolve in antisocial tactics, like firing missiles randomly at neutral neighbors, which is the same precondition you take as gating victory. Conflicts are played out in the real world specifically to resolve inconsistent modeling like this held by different sides, and all parties would be well served by finding a better way to resolve the conflicting modeling here, because the most likely scenario currently is that everyone loses.