Tankless water heater and shutting off main water supply
Shutting off the water is only a problem if the water heater gets drained and it tries to heat air. 

To avoid that you can turn off the water heater as well.

As an experiment you can turn off the intake to the water heater and see if the shower still leaks. If the leak stops then the leak is only on the hot side of the shower valve. Then you only have to shut off the hot water to mitigate the lost water until you can get it fixed. And the heater will be right there to turn off as well.