The US military threw in the towel and went home, leaving over $80 billion worth of military equipment behind and leaving the Taliban in control of Afghanistan. That's not what winning looks like unless you're just counting medals, five star hearts, and champions of ife. The USA retreated and went home. In other words, the USA lost the war.
You're starting to sound like the pro-Russia shill now. I contend the Russians lost in Afghanistan in the 1980s. The Russians and other Soviets killed vastly more enemy soldiers than they lost in Afghanistan. Using your metrics, you're saying the Russians won their war in Afghanistan since they dished out so many more deaths than they suffered. I disagree and contend that the Russians lost. After all, regardless of how many Islamic soldiers the Red Army killed, they quit and they went home. In other words, the Russians lost. Obviously, you disagree.