Yeah I certainly see it that way. I think saying the US got "defeated" by Vietnam drops some nuance.
WWII proves the US is perfectly willing to suffer at least 5x the casualties of Vietnam in order to achieve their objectives. They probably just didn't want to commit to that sort of cost and pulled out instead. Feels like a different failure mode compared to going all out and getting routed.