Thanks! Updating firmware indeed helped, and the problem is resolved. BTW, since the official update instructions are only for Windows users, here is the command I ran in case it is useful for others using Linux:
avrdude -v -c arduino -P /dev/ttyUSB1 -b 115200 -p m168p -D -U flash:w:WandererRotatorM54.20240208.hex:i