Ik you're supposed to be firm and put her in her place when she acts up

Along with being willing to or actually walking away.

What about when you're just with her and doing fun stuff, just be happy and jolly?

Wont the sudden mood change be weird?(fun to serious)

How do you put her in her place without getting visibly affected?