The issue the US has is that they really do not want to lose US soldiers in this war and because of that they are unwilling to fully occupy or destroy Iran. And the reason they don't want to do that beyond all the normal reasons is that this is a phenomenally unpopular war and every lost life is considered unacceptable by the American people. Similarly, causalities of innocent Iranians is not going to play well domestically or internationally, since one of the ever shifting reasons for war that was given was that the Iranian government was killing it's people. Helping the current Iranian regime kill innocent civilians seems counter productive to that point.
The US nor any country will ever be good at fighting a war where there is no clear objective and they are not fully committed. Winning for Iran is not losing and the US isn't playing to win, so Iran wins by default. This entire campaign is a textbook example of how not to go to war. No military equipment or capability is going to change that.