Why doesn't my LEGO Micropython remote control program work?
You can get community support for Pybricks at https://github.com/pybricks/support.
ir.buttons(1) returns a list of pressed buttons, so in this particular program
if ir.buttons(1) == Button.BEACON:

needs to be changed to
 if Button.BEACON in ir.buttons(1):

This will test if item is in list.