PoE standards require proper isolation of PoE circuits from ground (PE).
Devices are designed to avoid creating a conductive path to ground through the Ethernet cable.
When using shielded Ethernet cables, the cable shield can be connected to PE ground through the device enclosure. However, the PoE circuits themselves remain isolated.

This is in stark contrast to how equipment without surge protectors behaves during a surge.
The energy is spread uncontrollably through the device with accompanying sound or optical effects, and the device is irreversibly damaged.
