1) That’s still losing.
2) I’m not sure the military was doing just fine in all of those. Vietnam comes to mind, but also Afghanistan—reading the Afghanistan papers, the brass seems to have given up on any kind of actual goals or accountability in favor of a system that let them continually cycle officers through and let them claim they succeeded at their mission (funny, they all keep achieving their mission, but facts on the ground remain exactly the same or worse!), for years and years. Fighting fitness may have been OK throughout, but military leadership in the military itself was absolutely not committed to any kind of winnable mission, let alone to actually winning it. That may have been driven (I’m sure it was) largely by civilian leadership, but the entire upper echelon of military leadership betrayed their commands and the soldiers counting on them, to keep up a convenient (to their careers, and a bunch of junior and mid-tier officers who got a big boost to their careers…) political fiction at the cost of any hope of something resembling actual success, and all it took was shitting all over their soldiers and the trust of the American people.
I bet Iraq (part 2) was similar. I have some grave concerns about the state of our more-politicized-and-static professional officer corps since roughly Vietnam.