The Pakistani government seems to be able to prevent the Taliban from toppling Pakistan’s government, while at the same time being unable to eradicate the Taliban in Pakistan. If ther US withdrew it’s ground forces from Afganistan, I think the Afgani government, with military subsidies from the US would be able to produce a similar stalemate.
While I would love to see the Taliban cease to exist, I think it need to be acknowledged that there are limited resources at the United States’ disposal to eradicate them, and that there are any number of important investments that could be made with those resources both at home and abroad that may be just as worthwhile, if not more so than fighting in Afganistan.