The issue was always going to be how to finish an open ended war, against such a hard line ideology, in a country that has always proved nigh-on impossible to unite. Rory Stewart's documentaries on the BBC give a good historical perspective of the mess the West were digging themselves into; as usual the US produced all sorts of excellent plans for bombing, strafing, and suppressing the enemy, but had almost nothing in the way of consolidation plans or exit strategy.
What were the last 2 wars the US won without leaving an almighty mess ? The invasions of Grenada and Panama.