The 9th level spell Shapechange allows the caster to change into the forms of other creatures. Furthermore, the spell allows the caster to use an action once changed to take on new forms.
During this spell's duration, you can use your action to assume a different form following the same restrictions and rules for the original form, with one exception: if your new form has more hit points than your current one, your hit points remain at their current value.
The spell lets the caster retain the benefits of features, not just from class or race but from "other source"s.
You retain the benefit of any features from your class, race, or other source and can use them, provided that your new form is physically capable of doing so. You can't use any special senses you have (for example, darkvision) unless your new form also has that sense. You can only speak if the creature can normally speak.
With these two passages of the spell combined, could the caster retain features of a form once they have shifted into another form?
For a concrete example, suppose a level 20 caster Shapechanged into a Pit Fiend possessing the Magic Resistance trait:
Magic Resistance. The pit fiend has advantage on saving throws against spells and other magical effects.
If the caster then used an action to change form into an Ancient Brass Dragon, which does not possess the Magic Resistance trait, would they retain the trait from their previous form as the spell lets them "retain the benefit of any features from [...] other source" and the new form is assumed "following the same restrictions and rules for the original form"?