While Princess Margaret, in public anyway, was always loyal to her sister, I don’t think you can argue that she behaved well and enhanced the institution of the monarchy.
In fact, quite a few historians view her behaviour as the turning point that stripped away the deferential secrecy surrounding the royals and ignited modern tabloid interest.
Leaving aside the Peter Townsend affair, and her divorce from Antony Armstrong-Jones, there were the notorious photos of her with her younger lover, Roddy Llewellyn, taken on a beach on in 1976, while she was still married.
There was her notorious extravagance and endless partying and holidays during the time when the rest of the country was undergoing austerity which provoked public comment.
And although she could be kind, she was also known for her sharp remarks, and heavy drinking and smoking in public and causing offence during diplomatic visits.
Not to mention the private photo of her sat in the bath wearing a tiara which of course was published long after her death but nonetheless probably wasn’t the wisest pose in view of her sister’s position.
And yet she was supported by the RF and the institution to the bitter end.
My point is, the Royals have these skewed values in that they treat Harry quite cruelly as an outcast because he spoke out against the RF and broke the omertà , and imho spoke a few home truths and was honest about the insidious position of the spare, and yet they protected Margaret and Andrew and tried to cover up their poor, or even alleged criminal behaviour, because they didn’t say a word against the crown in public.
KC only stripped AMW of his duties recently because of public protest and he is still paying him a million a year so he can maintain his lifestyle. The RF would probably still be protecting AMW now if the Epstein case had not arisen!
In other words, behave as badly and corruptly as you like, within the institution, and they will support and reward you, as long as you maintain their secrecy. Utterly bizarre and murky if you ask me.