Worth a read.
"But for the reasons cited in this paper, a post-withdrawal collapse might come sooner. And so might the regret. The enemies that drew the United States back into Afghanistan in 2001 and back into Iraq in 2014 are still present in Afghanistan in 2019."
"As noted, it has become a common view that there is no military solution to the war in Afghanistan, but this is, at best, only half true. Winning may not be an available option, but losing certainly is, and a precipitous departure, no matter how rationalized, would mean choosing to lose."
- Consequences of a Precipitous U.S. Withdrawal from Afghanistan (2019)