Some reading for you.
https://www.northernradiator.com/knowledge/Electrolysis
https://www.freeasestudyguides.com/electrolysis.html
Some copy/paste: info
Electrolysis damage in an engine cooling system is caused by unintended electrical currents that flow from voltage differences that exist in the engine coolant jacket, the radiator, and the heater core. The damage can include rapid corrosion, pitting, flaking, and pinholes. ... The engine coolant is the electrolyte.
How do you remove electrolysis from coolant?
To solve this chemical electrolysis problem:
The cooling system must be thoroughly flushed using Interject Coolant Flusher, which is not acid based, to clean and neutralize the system. It should then be refilled with a 50/50 mixture of new antifreeze and distilled water.