I have a tankless gas hot water heater that powers a shower. There is minimal distance between the heater and the shower.
When taking showers and trying to mix the hot and cold water to get a temperature that's not quite so hot the heater will shut down which creates much colder water. What modifications can we do to allow for a medium temperature?
The heater is turned down to the lowest temperature setting and the lowest flow rate.
Adjust the tankless WH to the lowest temperature setting and the highest flow rate. In the shower turn the hot faucet on max flow and then add cold flow in increments as necessary to get a suitable temp.
If the procedure in 1. doesn't keep the water heater on, then open the hot tap on the bathroom lavatory faucet to get a small flow (say 0.5 gal/min) and keep it open while showering. This wastes water, but will keep the tankless WH on. Some low flow shower heads operate at such low flow that they just won't keep the WH on. We have this problem with our 18 year old Bosch tankless WH.
Get a shower head with a higher flow or remove or modify the flow restrictor in your existing shower head. I had to remove the flow restrictor in one of our shower heads to keep our Bosch gas fired tankless water heater from shutting off mid-shower.