When Pope Francis was the Pope,
some cardinals were concerned
he might suddenly allow gay weddings.
There is a way to block future Popes from doing that.
The Vatican could give each local bishop the power
to BAN gay weddings in their part of the Church.
The problem there is that some local bishops would not do that; it is the bishops in Germany who are among the loudest advocates for doing that (the entire “Synodical Way” has been an attempt by the Germans to obtain self-governance so they can implement this; perhaps they are concerned about being cut off from the Church Tax revenue if they do not align their doctrine with that of the far-left Evangelical Church in Germany.
The correct answer would be for the Pope to depose all clergy and remove from the seminaries any prospective clergy who have expressed views in support of changing church doctrine to allow for marriage of anyone other than an unmarried biological male to an unmarried biological female, and decree that if anyone laic should criticize the decision, they will be excommunicate and anathema unless they repent (thus the deposed clergy would be forbidden from commenting on it under pain of excommunication)*.. Problem solved.
This might sound severe, but this is absolutely the way the early church dealt with doctrinal errors. Laicize, anathematize, cauterize.
* The forms for this survey, without providing the correct answer, would probably, for ethical reasons, need to warn that the answer given could be used to determine the suitability of the person for obtaining or remaining in Holy Orders.
** One might wonder, why not anathematize the clergy who support homosexual marriage; the answer is that the ancient canons you usually cannot punish someone twice for the same offense, thus the usual form of a canon would be “If anyone in Holy Orders declares that marriage may be entered into by any other than one man, and one woman, let him be deposed, but if a layman should declare the same, let him be excommunicated.”