I don't understand why you would ask "what happened"? His world has been turned upside down. He is in pain and confusion. OF COURSE he is going to act out.
I disagree that "punishment" is the mindset you need to have. Discipline is what your mantra should be. Which means your job as mom is to HELP him figure this out.... not punish him when he can't. Discipline means that you set clear expectations of what you want from him. Simple. Clear. Consistent. Structured. And then you HELP him to meet those expectations and you HELP him course correct when he gets off track.
Think about your life in the past 4 months. How hard it's been. How out of control you have felt.
Now remember that YOU are an adult. with life experiences. with some degree of control. Certainly with more ability to cope and process.
He is 5. He is confused and sad. He didn't ask for this did he? But tantrums and acting out at 5 will be least of your worries if you don't approach him with understanding and HELP. If you come at him with punishments and lack of sympathy you are going to have major problems because he won't be able to navigate all this.
Yes, there should be different rules at different houses. But part of your job is to limit the amount of differences. So, as the mom said below - try to make some of the rules at your house the SAME rules as at Dad's and Grandma's.
You left because you didn't like how things were with his dad. Things will be better for you. So you understand why you did what you did.
From his perspective you ripped his family apart. You are the one that left and took him away, right? So, help him understand an minimize the damage by providing him EXTRA communication.
When my daughter would come back from her dad's we had dinner.... just the two of us. It was like a de-brief. So she could move between worlds. It was ALWAYS at the same restaurant. Consistent. Structured. We went straight from the airport to the restaurant. Always. Every time. So she could have the same routine to help her movement between worlds so she could transition from one life to the other.
I can tell you this..... My ex and I divorced when she was 4 1/2. It took her YEARS to really get the hang of going back and forth between worlds. Because she would just get adjusted and become a different person. Developmentally..... 5 is VERY different than 8. Then Puberty hits at 10. He is a different person and the worlds have to adjust slightly EACH TIME. For ALL of you. How you interact with him. What the rules are.
YOU only have to adjust ONCE for each state. HE will have to adjust MULTIPLE times.
I know you have a counselor... please talk with her at length about ways you can make this easier on your son. Making it easier on your son needs to be your NUMBER 1 priority.
I wish you and your son luck and peace.