As an early childhood educator, i believe that a 4 year old behaves better in school because of familiar rules and regulations. Once they are at home, they will feel that it is a comfort zone where they can be themselves and do what they want. I advised parents to encourage children to regulate their emotions by using words. Instead of being temperamental, they will slowly begin to talk to you instead. Try having word cards like "I need a hug" or "I need you to cuddle me" or anything that is suitable for your situations. Most of the the time, all children need is a simple attention. We parents thought that we gave them enough, but trust me, we need give out more. Good luck mummy!
Listening without judgement helps at times. Try to validate her feelings. Kids get stressed in school because of the many rules and restrictions so they can become rowdy when they return to a safe place which is their home.
Hi. This article maybe helpful https://sg.theasianparent.com/understanding-the-temperament-of-pre-schoolers