I don’t entirely disagree. But they were large scale military operations, however one-sided. They were expeditionary wars for all intents and purposes, just like Russia’s occupation in Ukraine is, even though no war was formally declared.
> A war has two or more participating countries and a dialect between the two to resolve the conflict.
That was how it worked historically between peer countries, a kind of gentlemen’s agreements. Asymmetric warfare is not so clear cut. Colonial wars were messier. So can be civil wars, which can spread across borders (just look at the Balkans).
> A war has casualties and losses on both sides of the border
Coalition soldiers died in Afghanistan. Many American died in Viet Nam as well, which contributed to the US finally losing in both cases.