A legal measure adopted by a later בית דין when the reason for the law is gone is well known to be the subject of a debate between the רמב''ם and ראב''ד. It stems from the כמרא in ביצה דף ה' ע''א.
The interesting thing about it is the רמב''ם in the introduction to the משנה תורה where he deals with a different issue about a local בית דין. There he brings down that no one has the authority to nullify a law of the גמרא. And we have in the גמרא a set of rules how to decide any הלכה. In any case the רמב''ם had no doubt about that. But among ראשונים there are different opinions on which of those rules takes precedence. The odd thing בהלכות ממרים ב' הלכה ב' does not seem to refer to a בית דין without the authentic סמיכה from Sinai which no longer exists . In the introduction he seems to refer to the kind of בית דין of three that can judge a very limited set of things. So in משנה תורה why does he not go into the subject of a בית דין with no true סמיכה. Obviously because as we can see he felt they had no authority to make decrees.
גזירות או תקנות שאומצו על ידי בית דין מאוחר יותר כאשר סיבת החוק היא בטלה, זה נושא לדיון בין רמב''ם וראב''ד. זה נובע מגמרא בביצת דף ה' ע''א . הדבר המעניין הוא הרמב''ם במבוא למשנה התורה, שם הוא עוסק בנושא אחר על בית הדין מקומי . שם הוא אומר כי לאף אחד אין הסמכות לבטל חוק של הגמרא. ועל שבגמרא יש מערכת הכללים כיצד להחליט הלכה. בכל מקרה לרמב''ם לא היה ספק בכך. אבל בין הראשונים יש דעות שונות על כללים אלה. הדבר המוזר בהלכות ממרים ב' הלכה ב' לא נראה שהוא מתייחס לבית דין ללא סמיכה אותנטי מסיני אשר אינו קיים עוד. בהקדמה למשנה תורה הוא מתייחס לסוג של בית דין של שלושה שיכולים לשפוט קבוצה מאוד מוגבלת של דברים. ברור כי כפי שאנו רואים שהיתה להם סמכות לעשות גזירות רק בזמן הגמרא
[That is the Rambam was dealing with the issue of local beit dins after the Talmud in the Introduction. There is openly refutes the idea of פוסק בתרא saying the later beit din can decide any way it sees. That is a different subject than the subject in Mishne Torah.]
So what you have in the Rambam are three relevant things. The first three Halachot in chapter two of law of ממרים, the introduction to Mishne Torah, the פירוש על המשנה in מסכת עדויות פרק א' משנה ה.
I see Rav Shach has an essay on this subject in the Avi Ezri.
In any case, it seems the main trust of the religious world is to be adding restrictions upon restrictions in such a way that no one can do anything. There is little attention paid to the fact of the Raavad and Tosphot holding that when the reason for the גזירה או תקנה is null then the law itself is null and void.
This applies through wide variety of laws where the reasons are in fact stated as in the case with most decrees.
The problem in the religious world is they relish in making up restrictions (that are neither from the Oral nor Written Law) that limit everyone but themselves. And the restrictions that do apply to them they always manage to find some way out of.
The religious world is really an epi phenomenon of the Shatz. It is just a different kin of manifestation of the same evil spirit that in infected the Jewish religious world in circa 1668.\
The same spirit in different forms.
The Lechem Mishna asks on the Raavad what about the statement אין בית דין יכול לבטל דברי בית דין אחר עד שיהיה גדול ממנו בחכמה ובמניין. One beit din can not nullify the decision of another beit din until it is great in wisdom and numbers. To that Rav Shach answers that the way to understand the Raava is on his explanation of the Mishna in עדויות א' משנה ה where it says מכיוון שהלכה כדברי המרובין למה כותבים דברי היחיד? Answer: in case a later beit din sees the words of the previous beit din and disagrees. If the later beit din depends on the words of the minority, that is OK.
The Rambam in the beginning of Mishna Torah and in that place in ממרים is saying roughly the same thing. That in terms of פסק הלכה a later beit din is not obligated to go by a former beit din. That is Halacha 1. But when it comes to תקנות גזירות ומנהגים a later beit din can not disagree with a previous beit din unless it is greater in wisdom and numbers. However a law made as a סייג לתורה a later beit din can not nullify if it has expanded to all Israel. That is the basic law in the Rambam and it is also how Rav Shach understands him.
The way you see that this is how Rav Shach understands the Rambam is the fact that in עדויות he says the Rambam has to be talking about גזירות ותקנות. Why not understand the Rambam simply that he means a פסק הלכה? Because the Rambam ties it in with the idea that a later beit din can depend on a minority opinion if it has רוב חכמה ורוב מניין. We already know from משנה תורה the Rambam does not require a later beit to need more numbers and more wisdom when it comes to פסק הלכה. So in עדויות he must means גזירות ותקנות
[That is in that Mishna ch 1 mishna 5 it says why write the minority opinion? The Rambam says there it means a later beit din can go with it even if it is a minority if it has רוב חכמה ורוב מניין]