Trump set a deadline for pullout, and Biden extended it. Trump's agreement was to release Isis terrorists as well as Taliban, and he cut out the Afghan govt from any negotiations. Reportedly, that was part of the reason the Afghans fell apart so quickly. Nevertheless, imo, the DoS and DoD should have broadcast in Afghan that the US would no longer protect American citizens or residents after the pullout began, and to leave the country at least a month before. But in fact, the DoS had warned Americans not to visit, and to get out, for months before. But the bottom line ... there's no visually pleasing way to lose a war. And we lost that one before Trump was even elected.