You may want to go brush up on asymmetric warfare. The Taliban is waiting us out because this is the easiest option for them to control the country. If it looks like we are sticking around they will definitely simultaneously melt into the population and start killing Americans at the same time. Them being on the run or not controlling population centers isn't a bug in their strategy, it’s a feature. They are smart enough to know they can’t line up and go toe to toe with the US military, so they will do all the dirty shit that makes them hard to kill without collateral damage, and/or exposing Americans to an increased risk to root them out.
Our technology counts for very little when it comes down to trying fight guys that use IED, VBEDs, suicide bombers, etc and are willing to die while taking Americans with them. I say this as a guy that spent over 20 years working on that technology. We have spent a fuck ton of money on sensor fusion, data collating, predictive AI, ECM, etc, and none of that gives us much of an advantage over guys that hides in a crowd with a bomb strapped to their chest with a dead mans switch. The Taliban is very aware that they don’t have to win any battles, they just have to keep chipping away at the fringes and get the American public to sour on the body count and cost.