I don't dishonor the dead by wanting the living back home. I honor the living by not wanting them dead. There is no "win" in Afghanistan because there is no country of Afghanistan. It's a mapmaker's invention, not a nation you can conquer and change. Maybe we could make up a way to "win" in Iraq but also highly unlikely. If you think there is a way to win (not that anyone has bothered to define win in the first place), you're naive.
Vietnam is a bad comparison by any measure, but in particular loss of life. Still, getting out of Vietnam was 100% correct and happened far to late for the thousands who died unnecessarily. Do you think another 30 years would have left Vietnam appreciably better than it was today? And if so, would it have been worth it to the tens of thousands more who died? No way.
And with respect to money concerns, you're head is buried (to quote my pal Magox) if you are willing to overlook the trillion we uselessly spent in Iraq/Afghanistan so far. Right now we're a trillion down and more trillions to go with no end or value in sight for all that money wasted except that our military is better-trained in urban and mountain warfare.