It was already a hostile border since 1947, long before NATO stepped in. Hostile but manageable. NATO invasion just aggravated the problem temporarily. Prior to that, the Soviet invasion had aggravated the hostility, but by 1990s the situation was improving.
NATO presence was a gift to India as the latter setup a covert presence in Afghanistan to conduct attacks in Pakistan via the porous Western border. At it's peak, there were suicide bombs going off in major Pakistani cities every month. When NATO decided to leave, India begged them to stay.
I suggest you enlighten yourself with actual Taliban-India relations for the past 40 years, how India has always been on the opposing side, against Taliban (and it's precursors) from NATO to Northern Alliance to Karzai and Ghani to USSR. And not forget for a moment that Taliban is a Pakistani-Afghan extension of ISI.
Western media is incapable of discerning between Taliban and most other non-Taliban groups operating in the region, such as the small anti-Taliban factions and the now nearly defunct pro-Indian.
NATO withdrew because of their massive intelligence failures in the region (the above paragraph being an example), incompetence of puppet governments, and widespread local support for Taliban. For example, nobody in the West knew that the leader of Taliban (Mullah Omar) had died of old age until several years later - this occurred while NATO was present in the country. And the fact that they did not have even a single video/photo of Omar except for a very questionable generic image. ABC News ran a short documentary highlighting that wherever NATO troops go, the civilian population tips off the Taliban, providing vital intelligence. This was a disastrous war for NATO and it's cheerleader India.