I guess the fact that it is a ‘rule’ might be what makes her stubborn about it. Some children are simply born stubborn, and the only way to manage them is with a lot of patience. Even if she is aware of the rule, keep reminding her about it, but rather as good manners to remember, rather than as a rule. Overreacting, shouting and getting angry will never work with stubborn children. Try to involve her in finding a resolution – may be make up a story with a fictional character like her in it, and ask her how she would deal with her. Be a good role model first (you might already be one). Show respectful and kind behavior. Give her respect, rather than showing authority. You can be firm but kind. And don’t forget t o praise her when she is cooperative and well behaved.
Cheers… Good Luck!