The Arduino is run off a separate supply and not the Mac
You need to connect the ground of this external supply to the ground of the Mac. If you don't it will not work or at best only work sporadically. Which looks like what you are seeing.
With the midi connector disconnected from the PCB, and the PCB powered from the Mac USB port I measure 7mA from midi 5 pin to ground on the pcb and 0ma from midi pin 4 to ground.