A few thoughts. Could he be hangry when this happens? Some children get ridiculously silly when their blood sugar drops. Try giving him something to eat before putting him in the sorts of situations where he can get silly. A bit of fruit, some raisins, whatever.
It sounds like he's a strong willed child. There are some children you can punish all you like and it will make them more defiant and determined, and shouting at them just winds them up.
I have one like this. You have to talk to him calmly and politely as you would a fellow adult (which tbf isn't a bad way to treat a child anyway). Everything has to be explained clearly but not dumbed down. Think new colleague at work.
My child is far better with a job to do. E.g. ask him if he can do a puppet ahow for hs sister in the car on the next journey. Or get him to make up the silliest song he can to make her laugh. But for mine you'd need to ask calmly in advance not when the behaviour has already started.
Punishments don't work for mine, but natural consequences do. But crucially for us only if the whole thing is done in a calm way, and not in the heat of the moment. So, to take your example, on another day when things are calm and nice and we've had some nice connection time, like reading him a book or colouring together or whatever, I'd gently say that I wanted to talk something through with him. I'd explain that I wanted to see if we can come uo with some ideas for changing his behaviour in the car because it is dangerous and unkind. I'd explain that unfortunately if I can't trust him to behave nicely in the car we'll just have to stick to essential trips meaning no going to X, Y or Z. But moving on quickly to say that I know he can do better than that, so let's work together to find a way that works for everyone to make car journeys easier and more enjoyable for everyone.
I'd vet a pen and paper and make a list together of ideas. Write down whatever he says no matter how silly. Have fun with it. But see if between you can agree some things to try off that list. Maybe a silicone fidget toy would help him? Being in charge of entertaining his sister? Choosing the music? Running around the garden ten times before he gets in the car? W
I know lots of people will roll their eyes; but in my experience treating kids as capable of understanding the issues and empowering them to work with you to find a solution can be very effective. If I treat my child as I describe he is very compliant, polite and helpful. If anyone gets more authoritarian with him he becomes like a different child. School say the same.
I'd suggest reading/listening to How to Talk So Little Kids will listen
Check out Good Inside. Also the Calm Parenting podcast. Both are great for strong willed kids.
What you're doing isn't working, so time to try something different.