https://en.wikipedia.org/wiki/Treaty_of_Tordesillas
Look at that line, and note which non-European countries speak Spanish and which ones speak Portuguese.
For instance, Brazil wound up being Portuguese (a rarity in South America) because it stuck over the line into Portuguese turf.
Do you really dispute that?
Not only was it not "ignored", but it's still effective 500 years later.
If such a treaty can be applied to inhabited lands, what makes you think one can't be applied to the lifeless terra nullius of the Moon?
The treaty you point out found its inception from a treaty that wasn't followed from less than a decade prior! This is even explained in your link.
And for the treaty itself, this is mentioned, "It was superseded by the 1750 Treaty of Madrid which granted Portugal control of the lands it occupied in South America. However, the latter treaty was immediately repudiated by the Catholic Monarch. The First Treaty of San Ildefonso settled the problem, with Spain acquiring territories east of the Uruguay River and Portugal acquiring territories in the Amazon Basin. Emerging Protestant maritime powers, particularly England and The Netherlands, and other third parties such as Roman Catholic France, did not recognize the division of the world between only two Roman Catholic nations brokered by the pope."
There is also this very important point about how this treaty was followed, "It did not specify the line in degrees, nor did it identify the specific island or the specific length of its league. Instead, the treaty stated that these matters were to be settled by a joint voyage which never occurred."
You are confusing the self-interest of countries with a non-existent requirement to follow words on paper. Countries follow treaties to the extent of alignment with their own interests. If treaties were always followed by countries, then this world would be a far different place than it is today. There would also have been far fewer agreed upon treaties.
And yet it largely remains effective. Despite all the things you mention, people still speak Spanish in the Spanish half. Ask the Aztecs, Incas, Mayas... how pragmatically effective the Pope's grant was.
I'm really not sure what your argument is here.
"The power goes out once in a while, therefore electricity is useless"? "Doctors can't always save the patient, therefore medicine is useless"? "People sometimes murder, therefore we should not have laws against murder"?
My argument is what I originally wrote, "Treaties on Earth have very little meaning. They have zero meaning on the Moon." That argument is supported by the contents of your link.
You posted a link to show a treaty that has been in force. However, your link shows the exact opposite of that. The treaty has never been in force, was started because an earlier treaty wasn't followed, and has been superseded multiple times by other treaties.