War is actually a negative sum game today; even "winning" you lose a lot. It's not clear to me if this was ever different for anything larger than Viking raiding parties, though.
US-Mexican War, US-Spanish war. US came out far ahead in bt cases, iirc.
That's still possible in a negative sum game; all negative sum means is that the sum of the benefits to all parties is less than the sum of the costs to all parties. So if say the US hoses the Mexicans but good it can still come out ahead as long as the Mexicans go down hard.