It really has little to do with troops having given up.
War is all encompassing. It is military and political. If you lose either, you lose the war. The war in Vietnam was lost by the military. It was unable to win the trust of the locals all the while focusing on attrition which only made their moral position in the eyes of the local population worse. They did not understand unconventional warfare and most evidence suggests that they didn't even want to try to understand it, all the while being fixated on thinking they were fighting another World War II style conventional war. The man who did realize that a different kind of war would follow was John F Kennedy, who managed to get the military adopt the concept of Special Forces. The leg Army of course was not amused and met it with much resistance and many times tried to use Special Forces soldiers as elite NCOs within conventional formations at worst and use them strictly for Direct Action missions at best. That is bad Generalship. Yes, the military did lose the war in Vietnam.
Also, when you need to win the trust (therefore the Hearts and Minds) of the locals, a pull out date is essentially a "this is when you die if you side with us" date. Think about it. Would you side with the Americans if they said they would leave next year while it's plainly evident the Taliban will still be around and don't show any signs of going anywhere? Hell no.
Has little to do with servicemen suddenly giving up, which is not the case.