I made a repeating command block that turns off melee mode for all mobs and it worked, but it didn't affect the wardens sonic boom. The command I used was ( event entity @e minecraft:melee_mode ) and I tried ( event entity @e minecraft:switch_to_melee ).
This is more of a feature request to make wardens function via the same json event structure as certain other mobs. It’s not a bug that they don’t.
Wardens simply do not use events to switch between modes of attack. Similarly, Evokers do not use events to switch between fang and vex attacks.