Schools generally respond to unwanted behaviour by doling out sanctions without a second thought.
As his parent, you need to invest a bit more effort and find out what the reason is behind this behaviour before deciding what action to take.
Maybe he's using clowning in class to cover up something. It could be that he's struggling with some of the work and could do with spending a bit of extra time on one or two subjects to catch up/ build his confidence.
He could be struggling a bit socially and has discovered this as a way to gain peer approval.
Maybe there's a sensory issue nobody has realised is affecting him.
Maybe he's more able than the teacher realises and is bored - no excuse for bad behaviour but some extra work could sort that out.
If he is struggling in some way, adding a further sanction isn't going to help.
He might just be behaving badly because he enjoys it and thinks he can get away with it but it's not reasonable to just jump to that conclusion and act accordingly. There's usually a reason behind bad behaviour and it sounds like he has firm boundaries at home so that's unlikely to be the issue.
I'd be inclined to get him doing something shoulder to shoulder with you, peeling veg, going out in the car, or similar and get talking about school. You may find out something helpful. You may also find that having to have a heart to heart with you each time he gets a detention is a deterrent in itself.
Whatever happens, you need to understand a bit more about what's going on before trying to manage it diving in with an extra sanction. You could be making matters worse.