It’s useful to look at the difference between Obama’s withdrawal from Iraq and Trump’s. Obama announced a sudden withdrawal on date certain, and handed 2/3 of the country over to ISIS along with enormous stores of modern weaponry. Trump destroyed ISIS and started a musical chairs withdrawal that left several garrisons there including a major one in eastern Syria which protects the Kurds and secures the oil for them while giving us options throughout the region. He otherwise kept us out of the Syrian civil war.
This is likely a model for how he would have conducted our withdrawal from Afghanistan.
ISIS got to its limits when it hit substantial Shiite and Kurd territory, which is most of the country.
Afghanistan has Shiites (Hazara), but they are a small minority.