So far Iran is doing better than expected, given that they were taken by surprise by the Israeli attack. Both sides (Iran and Israel) are hurting, and both are trying to de-escalate without losing face. Of course, if the US mounts a concerted airstrike against Iran, they would be in much deeper trouble, but for various reasons, the US does not seem willing to go all out against Iran for the moment.
If the war starts to wind down, then Iran can count it as a win, and hopefully make wiser decisions in the future.