In both cases, Washington chose to stop sustaining a local government that could not survive on its own.
Saigon fell on April 30, 1975, which was a little over two years after the last US combat troops left Vietnam on March 29, 1973. US did not lose Afghanistan on the battlefield. US military overthrew the Taliban government, dismantled al-Qaeda’s sanctuary, killed Osama bin Laden, and prevented another major foreign-directed terrorist attack from Afghan soil for nearly twenty years. American forces were not defeated or driven out; they left because elected political leaders decided the mission was no longer worth continuing.
In both cases, the threats were eliminated. Hanoi is now friendly to the US. Iraq is friendly to the US. Syria is friendly to the US.