Why lines A and B are HIGH when idle (rs485)
RS485 (TIA485) can be tristated when idle.  If it is, the terminations would determine the state of the lines.  It may be that the Pi terminates them differently than the Arduino.