The key is in the name galvanic isolator. Isolate the boat galvanically.
From Galvanic Isolator:
When boats connect to shore power, the ground electrically connects the boats together. This means that protection on a boat protected with sacrificial anodes is extended to vessels without protection or depleated protection, essentially consuming the sacrificial anodes at a faster rate. Note the flow of current in the image.
Zinc anodes form a galvanic battery to give the boat a -1.05V DC potential. Silicon diodes have a 0.6V to 0.7V potential, so 2 in series give 1.2V minimum. This isolates the boats galvanic protection and allows the protection to work while connected to shore power.
simulate this circuit – Schematic created using CircuitLab
The isolator must be designed to pass the full ac fault current back to the source (shore power), so there must be 2 sets of diodes in parallel. The isolator isolates the DC sacrificial protection to the boat, while allowing shore powers ac short-circuit protection to operate properly.
The sacrificial anodes must be connected to all components that need protection (shaft, propellor, rudder, etc.). There is no requirement to bond it to ground. But regulations require the ac ground to be connected to the DC ground. Engine is connected to DC ground and the engine is connected to the shaft, so sacrificial anodes are connected to ac ground.
So the second image does not show a connection between DC ground and ac ground. This means there is a path for current flow without a galvanic isolator.
The galvanic isolator must be mounted between shore power connector and the switchboard, in a location that allows testing. Mounted elsewhere means it does not provide isolation and current will probably flow.
Beyond the question: They can fail in open or short. Open no path for short circuit current to flow, which is dangerous. Short and boat's sacrificial anodes extend to other boats.
The attached reference provides a very good explanation of the device.