You want your grounding system to be tip-top.
In new work, the correct grounding system is:
- A grounding system (ground rods etc.) at the house
- Another grounding system (ground rods, whole nine yards) at the detached building
- The two grounding systems connected to each other by the grounding wire in the AC power cable which supplies the detached building from the main (or vice versa).
This can be bypassed in some cases, for instance if you have a single circuit powering the outbuilding. (no subpanel).
So your first step is to bring your current grounding system up to current code.
The upshot is that your ethernet cable has not a ghost of a chance if it's asked to carry lightning currents, and the electronics on both ends have no chance if exposed to lightning voltage. You want to pull lightning away from your electronics, e.g. by having proper lightning rods on the buildings. When lightning strikes, there will still be a several thousand volt voltage differential between the house grounding and the outbuilding grounding, that can't be avoided.
I would put an expendable electronic device on each end of the run, like a hub or ethernet amplifier. And make sure that equipment is properly grounded.