When I had a trimaran I had a propane fridge/freezer partially mounted so that any leaking propane would go directly overboard. That would be pretty difficult to do with a water heater, and I wouldn't be comfortable with it being mounted where I couldn't smell a leak immediately, and no way to vent the gas overboard.
Yes I know, stoves are propane and mounted below, but they are in the cabin one lives in, so a leak should be relatively quickly identified. Stoves also have a remote solenoid shutoff, which would be a major inconvenience IMO for a hot water system. I have investigated the on demand systems, but never used or installed one on a boat.