It's all part of a great game of covert ops between the ISI vs RAW/NDS Nexus stretching from Tajikistan all the way to eastern Bangladesh.
From the 90s-2001 Pakistan dominated the Afghanistan/Tajikistan realm, from 2001-2018 India dominated vis via Pakistan with its proxies on the ground. From 2018- Onwards Pakistan/ISI have took back the initiative and have struck Indian proxies (BLA/NA/RAW) in Afghanistan mercilessly. As of now the Taliban are making sweeping advancements far faster than expecting with many Afghan army personal even attempting to flee into Pakistan...
As of now India has nothing to show for itself vis via Pakistan or China. In the north it is cornered and has moved troops away from the Pakistani frontier to accommodate its fast losing positions against China. India has been forced into a ceasefire with Pakistan on Pakistani terms when it comes to dominating Afghanistan. For now India has been forced to focus on China while Pakistan is able to focus a greater deal on securing its realm in Afghanistan.
Modi wanted to take out Hafeez to score huge political points and to make a statement. Sadly like his previous misadventures it was poorly planned, failed miserably, and will likely come back to bite him in a counter intelligence op.
Its a very uneasy position to be in for India but does provide it with the benefit of building up its forces in the next few years (Rafale, S400, SSBNs, LCA, etc...), but then again atleast 30-50% of these forces will now be deployed against China. Pakistan on the other hand would deploy 90% of its new equipment against India in the next few years. If you thought Pakistani military modernization was fast in the last decade then in the next 4 years there are many new equipment coming into service (J-10 Expected, Type 054, S20 Subs, JF17B3, HQ9B, VT4, etc...). The Afghan frontier will become a better security prospect for Pakistan to focus more on the eastern border. A clear reversal from the limitations of the last 2 decades.
India never before had to deal with 2 large adversaries at the same time. Now the possibility of a 2 front war has increased many folds and is far more likely now than a single conflict.
Its an interesting time to be alive I would say because some of the greatest Intelligence covert battles are being fought today in the realm of information, propaganda, data, etc...