Why does isolation transformer protect from shock?
It's not really meaningful to talk about the voltage between two points that are completely isolated from each other.  Any attempt to measure the voltage changes it.

Any real-world voltmeter requires a small current to pass in order to measure the voltage, which means it acts like a resistor.  For a modern digital meter, this might be about 10MΩ.  So by attempting to measure the voltage between two isolated points, you're changing the circuit by connecting them together.

If you actually tried to measure the voltage between A and G, it probably would be about 0V, but only because you've connected them together through the voltmeter.  The same goes for B and G.  If you connected two voltmeters at once (A to G and B to G), they would probably both read about 115V.