Simpler argument?
I don't want to defend Iran, where they execute people for being gay, amongst other things, but...
If Amazon were ever to go bust then I am sure that courts would not hesitate to sieze their newly and expensively acquired .book top level domain (which by the way stikes me as being appropriation of the English language).
But in the case of a sovereign country, siezing the Internet domain name .ir would make as much sense as siezing the telephone dialling code +98 or the name of the country as a postal destination.
Surely there must be longstanding international or diplomatic law preventing such nonsense. The legal argument that this judge has used seems to be rather contrived.