Keep separate ground rods out and away from the units and disconnect and ground those long inbound wires collecting energy.
RE - Woof - I used to have Short wave antennas that would collect enough power to keep neon bulbs connecting them to ground as spark gaps lit up day and night for days. Those bulbs fire at 90 volts.. AND that was after storms passed. When lightning strikes within 1000 feet, it will induce 15KV per foot of wire that's not grounded. That can get lethal quick. That was done back when the receivers were Tubes and no solid state which frys instantly. I kept a 2 MFD cap between the antenna and receivers which isolated the AC pulses DC that was collecting on the wires, and when voltage exceeded 90V the bulb would either flash or remain on..
There's an old experiment from over a century ago where you would take a coat hanger and bend it into the letter C with a one inch gap and hang it from a dry thread on your porch, and when lightning struck real close it would jump the gap, which amounts to about 15KV... With that in mind, just think of the energy which is collecting in the wires of the system coming in. Grounding those inbound wires to ground rods outside the buildings is the best way to keep it from getting into the inverters.
Also, taking the incoming wires and winding them into a 9 turn air coils around an oatmeal container (and removing the container), will create an arc-over isolation coil on each incoming wire. I have it like that on the 220 lines that feed the submersible well from the utility pole down into the well hole, as well as similar turns about 15 feet up from the submersible pump wrapped around the water line which is under the water inside the casing over 50 feet into the earth. Copper wire is a lot less costly than the pump. IT's a simple way to prevent current from jumping into the pump. It will arc into the well casing first where the steel cable holding the pump is connected. If that happens down there, you have to pull up the pump and replace or patch the wiring and not the pump.
Dissipating the jolt and surge into the ground is essential. Put 10 UF capacitors on the outside of the isolation coils and connect them to the ground rods on the wires that feed your system. That will pass the HF induced standing waves and voltages which occur from lightning discharges that are within several miles. These amount to pulses that have RMS voltages of several hundred, and peaks of several KV up to 5 and 10 or more when the proximity is under a mile, depending on the severity.
If a severe positive return stroke, or multi step return with high current hits it will travel through everything and melt it down. A billion volts with a thousand amps will only dissipate into the empire state building without frying anything. Research in the 1930's documented this and published it in books with camera images and scope measurements.
There was a fellow in Middle Tennessee on a high road approaching Red Boiling Springs who had lightning take out a tree and bore a trench for hundreds of feet and then melt an iron fence right off the ground for another hundred feet and then enter the underground wiring in the wells and house and fry the entire breaker box. Another guy lived at the bottom of a hill 600 feet up who had a TV antenna up there, which when hit like this the lightning came down the cable which was buried into the ground 400 feet behind his house at the bottom of the hill, where it then followed the cable and went right into his A frame house from one end to the other putting the TV and every appliance in the house on fire while he was sitting on his couch. Lucky he was there to snuff it out. All were toasted.
This severe circumstance is not a really common thing, but there are lots of people who have a story about being hit with discharges in various parts of the country at their places.
The incidence of lightning hitting out in the open around towns and populated areas is lessened today as a result of the multitudes of cell towers that stand across the land as a network of needlepoints. (the influence and effect of this man made grid on the phenomena itself on an overall basis is not documented in it's own right).