The difference is that Israel, too, supported Resolution 242.
It may surprise you (if you ever bother to study international law) that there isn't ANYTHING illegal about that. On the other hand, Jordanian rule of Judea/Samaria WAS illegal, and many of the U.N. resolutions condemning Israel for this-or-that are either non-binding or (if they contradict the Charter) illegal themselves.
If you read the recent statements of Arab leaders carefully you'll discover that a number of them omit references to international law when they talk about the Israel-Arab conflict in favor of international resolutions or some such. That's because law is on the side of the Zionists, not their enemies.
It is your burden as a Pakistani that your universities and government compel its citizens and students to accept the Emperor's new clothes. But you demean yourself and embarrass your silent countrymen by pretending it looks sumptuous, rather than ludicrous.