From my own experiences with this issue, you should be able to replace either pump with either pump or with the drive unit coolant pump. First generation Tesla Model S pumps work fine and cost about $100 on eBay.
I replaced both pumps with the equivalent Tesla Model S 2012-2016 parts and they're running two years later. I swapped my drive unit coolant pump, which had failed, out for one of the battery coolant pumps and that, too, is running two years later. So those three pumps were clearly interchangeable. Also, all three pumps had the same Bosch part number, both operate on the same voltage and have the same duty cycle programming on their control pins, and both have the same connector.
So, why would Toyota have different part numbers for the pumps? I suspect that this is for historical reasons. This car was engineered in a very short time (Wikipedia says 3 weeks from contract signature to prototype) and probably under a lot of corporate secrecy given that Tesla had not launched the Model S yet. An indication of this can be found in the placement of the onboard charger. The onboard charger has fuses inside it which is a rookie mistake by Tesla but on the Model S it's under a seat so pretty accessible. The the more experienced Toyota engineers buried it under a maze of wires and hoses (see this topic: https://www.myrav4ev.com/forum/viewtopic.php?t=2530
) and removing it takes hours so most likely they simply did not know about the fuses. It's not much of a leap to assume that they did not know that the pumps were identical since the parts were probably sourced from Tesla.