I don't understand one thing about Pakistan's position. I mean there are obviously two scenarios in case of Iran:
Scenario I: Iran wins the war and defeats the US. Then Iran's geopolitical position in the region gets even stronger than before. Then Pakistan who has helped Saudi Arabia and Kuwait will be neighbors with an Iran that will remember Pakistan's betrayal quite well. How does that serve Pakistan's long-term interests?
Scenario II: Iran loses the war and becomes another US vassal state, even if severely weakened after the war. A pro-Israel regime will take over Iran with the Iranian diaspora ruling over the new Iran. Then who do you think Iran will side with? Pakistan that formed alliances with its Arab enemies or pro-Israel India who also happens to have a much larger economy?
Pakistan is putting itself in a lose-lose situation with regard to Iran in the future. Pakistan could at least form a strong relationship with Iran and hope for Scenario I to come true.