Defeat is the US military getting routed and decimated. Defeat is US aircraft carriers sinking to the bottom of the ocean. Defeat is Washington getting nuked.
What actually happens is the opposite. Americans show up and inflict staggering casualties while suffering a relatively small anount. Then they suddenly leave for some idiotic reason like the president wanting reelection.
America's enemies don't need to actually win, they just need to resist as long as possible and drive up the costs of the war via asymmetric warfare.