I don't think anyone has any illusions that the US lost militarily, but it's a bit disingenuous to only look at that part of the picture. The majority of expenses were on the occupation and nation-building efforts, which are a mixed bag as far as success is concerned.
Some examples of the "good" are the massive amount of infrastructure that was built/re-built and the trade that was established with other countries.
Don't mistake what I'm saying for a defense of the invasion of either country. Just trying to look at things objectively rather than through an emotional lens.