The Castellammarese did not lose that war. With the help of Lucky, Vito, and a few others, they won it hands down with the assassination of Joe Masseria. The fact that Sal Maranzano was later killed doesn't change that fact.
The best indicator of who won a war is who's in charge. Lucky and the Americanized faction were firmly in charge after they killed Maranzano, a killing they faced no meaningful consequence for. Bonanno and Maggadino were the only Castellamare guys with any real power after Maranazno's death and Maggagino submitted himself to the Americanized faction, much to the chagrin of Bonnano who was the last holdout of the Castellamarese and his passive-aggressive actions eventually got him shelved. Since then The Palermo and Corleone mobsters, who submitted themselves to Luciano's Americanized faction right away, became the more dominant faction of Sicilian clans in the states and this seems to have not changed to this day.