A good example of a system trying to prevent this is the constitutionConstitution of Norway.
The constitution has various ways to protect itself from being altered in undesirable ways.
Changes to the constitution require a 2/3 majority in parliament, and perhaps more importantly, they require two consecutive parliaments to confirm the changes. This means that if a parliament attempts to pass changes to the constitution that are not favored by the people, the voters have the chance to vote those representatives out of parliament before the changes can be completed.
Requiring a 2/3 majority twice is meant to ensure that only desirable changes are made to the constitution, and typically means that changing the constitution takes years, since a new parliament is only voted in once every four years.
This does not mean that the constitution is not changed, but it is meant to ensure that changes are thought carefully through, and agreed on by many people.