Oh yeah, this is clearly a defeat.
We threw away $30bn+, plus whatever danegeld we're paying, plus 15 American lives, plus a whole bunch of airframes, plus we antagonized a lot of other states, in order to put Iran in a stronger strategic position than they were when we started.
Absolute disaster.