if they are both configured the same which I have no reason to doubt then I would guess its an issue with the button itself or its connection to the esp.
does the button sensor (not the switch) show “on” home assistant when the button is pressed? or you could look at the esphome live logs whilst pressing a button to see if it shows anything. if not I would hazard a guess that its a faulty button.