While we fucked around in the middle east, Russia regained strength and China emerged as a peer world power. Does anyone want to bet that Iraq or Afghanistan will remain our loyal ally in this new multipolar world?
We're now $30T in debt with a 125% debt-to-GDP ratio. All of our allies are completely emasculated by 70+ years of U.S. hegemony. And no one has an appetite for war on ideological grounds when we lied about all the past wars and protestors are getting trampled by horses and un-personed from the financial system without due process in a 'liberal' western democracy.
Strategically speaking, you can win a battle but lose the war. It was an absolute loss from that perspective.
By that logic, the Germans lost the Franco-Prussian War because they subsequently lost the First World War.
The war massively damaged the US government's credibility, both domestically and internationally, cost the US ~$2T, and did little to stabilize the region; one might be able to argue that it destabilized it, in fact. The US won a military victory in Iraq, but emerged worse off on the whole as a result.
The US thoroughly rolled the Iraqi military, killed over 1 million Iraqis, overthrew their government, and installed a new government in Iraq that still exists today.
To say this is a "loss" leaves us at a place where the term has no meaning.