Please - stop with the US scapegoating of Pakistan.
One day it's Pakistan, the next it's the Iranians and then its the Russians.
At some point Americans need to acknowledge that their military and successive government's had no clue as to how to deal with Afghanistan. The US sidelined Pakistan thinking they were schmucks who would be satisfied with some measly short-term aid dollars whilst building a strategic relationship with India and turning a blind eye to Afghanistan and the Afghan intelligence agencies sheltering and supporting Baloch & TTP terrorists.
The insurgency in Afghanistan exists because of local support. It is led by local commanders with foot soldiers on the ground who receive support and shelter from the communities in Afghanistan.
'Thousands' of Taliban leaders & fighters don't cross the border into Afghanistan from Pakistan every day to carry out attacks - if that were the case, why didn't the US and Afghanistan help fund and construct the fence/wall that Pakistan eventually started constructing on its own?
The US administration and military have treated most Americans like a bunch of chumps and sold them their absolute strategic failure in Afghanistan by scapegoating everyone and their uncle.