Actually our relationship with Iran is pretty much the same during the Shah's rule as it is now under the Mullah's , the only exception being Iran's role in the 1971 war during the Shah's rule & Iran's interference in Kashmir & other issues like the SRJB or the so called mistreatment of Muslims etc now under the Mullah's .
Subsequently a lot of things changed. Paxtan continued being America's bitch even if Iran turned into an implacable foe , anti Shi'a sentiments & pogroms became common place in Paxtan increasing friction with Iran , Paxtan let itself be used by the US & the Gulf Sheikhdoms to needle Iran , there was no 1971 style war since & so on .
India merely exploited these fault lines to our advantage by getting Iran to be relatively neutral or even handed in its relationship with us vis a vis their relationship with Paxtan.
It's something best described by this scene from the Godfather Part II
View: https://youtube.com/shorts/11t1SZT6ah8?si=f9T7Vk2mwkRxvUqm