Very well said and in case any such conflict of interest arises between both parties and they are somehow not able to talk bilaterally, they will know for sure that Pakistan has good relations with the other party and therefore if we present our case then Pakistan can act as a mediator. Sort of like how Qatar has been mediating between first the Taliban and the USA + NATO and then trying really hard to mediate between Hamas and USA + Israel. Pakistan can play that role of Oman or Qatar in mediating between rival "Islamic" entities who will both trust the word of Pakistan. Pakistan qualifies for this role, because of its very tough history of warfare and conflict, internal & cross border terrorism, foreign agents operating and causing trouble inside, proxy wars, getting used and then duped by world power, political engineering etc. this all adds to the experience (although negative) Pakistan gained which most of these countries don't have.
Of course Pakistan it self has to make it self ready for such situations and not get bogged down with "grouping" among the "Ummah" countries as well as steer clear of any controversies and maintain a trustworthy approach.
The problem arises when Saudi invokes the treaty to ask Pakistan to intervene in Yemen, against the Houthis. Perhaps only from the air at first, shooting down missiles overflying Saudi air space, on the way further north.
Then Saudi asks for Pakistani troops into Yemen.
We have to be careful of the terms of the treaty, because it seems more one way; Pakistani defense of Saudi. I don’t foresee how Saudis will commit to intervening to actively and kinetically fighting India.
This is why stating with building fighter jets and air defense missiles is a good middle point. Then expanding to the nuclear umbrella, with Saudis funding an expansion of the rocket force and nuclear arsenal in exchange for a deployment of perhaps 50 Pakistani nukes to Saudi territory could seem plausible. But there will be blowback as it will put some countries in range now. Saudis will therefore have to shield Pakistan from the consequences if it signs up for this.
If the Pakistani establishment decides it wants to commit to deployment to Yemen, aka defending Saudi as they envision it, then Saudi will have to compensate for the blowback for Pakistan, in terms of military modernization, relations with Iran, the economic blowback, the domestic sectarian blowback inside Pakistan, etc.
But this seems to be a second chance at what
@MastanKhan said Pakistan should have joined back in 2015.
But in effect will Pakistan be fighting a non-Saudi force that is actively fighting the ones this treaty was suppose to be about protecting from?