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.
You are using the function run_target... which tells the motor to run to a specific angle.
So it turns to an absolute position...
This might be correct for the pen_up and pen_down cases, but I think that for the movement, you want relative movement, i.e. relative from your current position, hence I think the instruction you need is run_angle instead of ...
Printing text in pybricks-micropython on ev3dev has known performance issues, so we don't recommend doing that in a loop. The trade off is that, unlike ev3-g, you can also print in other languages that don't use Latin scripts like Chinese and Russian. Most other things should run much faster.