The Iranian regime may see it differently...especially given the extreme difficulties they're likely to face in another public uprising if they DON'T have some kind of diversion. Heavy strikes on Iranian military targets might encourage a rally-around-the-flag show of support and actually empower the regime, whereas letting them stew would almost certainly lead to another mass uprising when the money runs out.Talking two different situations here. Strikes to stop Iranian nuclear capability and a reaction to acts of war would be different situations. Admittedly the latter does not mean regime change, but there would be heavy strikes on iranian military targets and would probably heavily destablize Iran. With the precarious situation Iran is in, that could easily precipitate internal regime change.
In terms of the ayatollah's grip on power, I'd say they have a lot more to fear from their own people than they do from either the Israelis or the Arabs. And judging by their actions, the ayatollahs themselves seem to have reached the same conclusion. I doubt the question of "Will Israel launch a war that ends in our removal from power?" even crosses their minds. A better question from their perspective is "Will a war with Israel make it more or less likely that our own people will rise up against us?"Again, Iran has a very limited number of tools it can work with, and only a couple have the potential for positive outcomes for the Iranian power structure. Either bait israel into an act that would bring the Arab states together against Israel, which is unlikely, or keep working on diplomacy. The latter is far more likely to work.
And honestly it's probably too late for any sort of diplomacy. Iran is in truly dire straits and is likely to face a severe crisis within days or a few weeks at most. Time has already run out for any sort of major diplomatic breakthrough.