The OP article is not wrong in highlighting Pakistan's role. But, in the end, it was the American 'hubris' and the 'contradictions' in the American policy in Afghanistan which had 'doomed' the chances of American success.
As for Pakistan-- it paid a very high precise for holding its ground and not compromising on Pakistan's strategic interests. But if Pakistan would have given up Afghanistan to India then ALL of Pakistan-Afghanistan border would be like ALL of Pakistan-India border!!
This NY Times article is worth reading in entirety. Some excerpts given below.
How a series of fateful choices and lofty ambitions put Taliban defeat at odds with American victory.
www.nytimes.com
The Contradiction That Doomed America’s Mission in Afghanistan
How a series of fateful choices and lofty ambitions put Taliban defeat at odds with American victory.
It took barely two months after the U.S. invasion of
Afghanistan in October 2001 for the United States mission to
point itself toward defeat.
“Tomorrow the Taliban will start surrendering their weapons,” the Taliban’s spokesman, Mullah Abdul Salam Zaeef, announced on Dec. 7, 2001. “I think we should go home.”
But the United States
refused the group’s surrender, vowing to fight on to shatter the Taliban’s influence in every corner of the country.
That same week, Washington oversaw an international agreement to establish a new government in Afghanistan that would be “by some accounts the most centralized in the world,” said Frances Z. Brown, an Afghanistan expert at the Carnegie Endowment for International Peace.
This left the United States pursuing dual missions — eradicating the Taliban and installing a new, highly centralized state — that were not, at least at first, irreconcilable. But a series of choices put them increasingly at odds, engineering what became a fatal
contradiction into the American effort, which President Biden
announced he is ending after 20 years of war.