That's most likely because the meaning of the term "Winning" had changed
In the old days (like Roman old) winning a war is when you conquer a land, and take that land as yours, and you defend that land until you are defeated. That is the definition of winning.
Problem is, war aren't fought like this since a long time ago, even during WW2, the term "Winning" is not gauged by how much land you took, because you have to give it all back to France, Netherland, Belgium and so on, which mean you are just a tool to recover those land, more like a creditor chasing a debt. Well, at least this is our side, The Soviet? They kept what they took.
When people said to me we "lost" the war in Afghanistan. My response is "Lost? What can we possibly win in Afghanistan?" I mean, it's only natural, if you lost, which mean you had the chance to win something, but what can we possibly win in Afghanistan? We are not there to conquer their land and take it as ours, we are not there to settle in that land, I mean, when we took the entire country, we gave it back to the Afghan government. We don't send in the American to settle that land and make it our 51st state, instead, what we were doing is play a giant game of whack-a-mole. When Taliban peek his head up, you smash it with a hammer. And when he duck back down, there are nothing you can do, because you can't and you aren't allow to chase them over.
At the end of the day, the question would no longer be "What can we possibly win" but rather, "What are we doing here?" You have to have a goal for you to focus to keep on doing what you are doing, but after we invaded and conquered the entire country and gave them back to the Afghan, and killed OBL, what was our objective there? What is our war goal? There aren't one, well, I stand corrected. There is one. Which is to see how many Taliban you can kill in that wrack-a-mole game, for us, killing Taliban is not a objective of war, it rather become a sport. a thing that you keep tab on, the daily report always include how many insurgent you had eliminated. How many bomb factory you have destroyed, how many IED you had discovered. We don't chart our progress by how much we have won over the local, or how much progress to delineate Taliban in a region.
So what is the war goal? We don't know, and perhaps what we were doing over there can be summed up pretty well with this clip from the pacific.
So when I was asked why we lost Afghanistan? My answer is, what can we possibly get in Afghanistan??