Hi OP. My daughter is only a few months old, so I can't give advice from a patent's point of view. However, as a teacher, I know that children can become exhausted by the end of the day after having to regulate their feelings/ behaviour during the day at school. They often walk out the classroom door and have a melt down/tantrum with their family after being good all day in class.
Some ideas I'd try with my own child after school- a snack ready to boost energy, some form of wind down activity if they are tired. Before heading to the park/out i would remind my daughter that although she is tired from school that I will expect her to talk to friends/family with respect and outline consequences if she doesn't behave. If she has a meltdown or shouts I would help her identify her emotions and help come up with a coping strategy that we have discussed beforehand. E.g.
"I can see you are feeling/embarrassed/angry/hurt. Let's think about what you can do to help you feel better. Take deep breaths/try to relax your body/take a short amount of time to calm down by yourself/ask for a cuddle."