The idea of the solar cell being in contact with the water
is to eliminate losses due to resistance of wires, diodes etc and increasing efficiency by leaving out traces on top of the cell. If a cell in an array fails, or is just shaded, with no diodes the power from the rest could short through the failed one. So diodes are normally used, but each diode has a voltage loss.
In a direct method like this, each cell is right in the water, with no wires, sun hits it and it bubbles H2 and O2. Shade it and it stops. If the TiO2 coating has low resistance, but prevents corrosion, on a small scale, put cells in a bottle, and pipe off the gasses, little chance of ignition from the electricity used. It could be even a closed sealed system with a fuel cell.
On a bigger scale, cells arrayed in sealed trays with water, and again piping to collect gasses.