As was mentioned, the modern marine-rated propane water heaters, are quite safe. ABYC standards require all onboard gas appliances to have proper venting, an electronic pilot and safety gas shutoff features. It's also wise to have a propane sniffer and CO alarm onboard.
We have a Junkers unit, currently built by Bosch - a German company, but the units, service and parts are widely available in the US. It's mounted directly on the bulkhead between our galley and the upper pilothouse - with a through-venting feature, incorporating a stainless steel hood and directly connected to an exterior, anodized aluminum damper, which can be closed if desired, especially useful when sailing in heavy weather.
Here's a pre-purchase photo, showing the heater over the galley sink cover:
All gas lines on the boat are copper and our two 10# tanks are contained in approved exterior lockers. With the 140 gal water tank, we have unlimited hot water between fill-ups, without the need for shore power or the engine running. We've had electric/engine heated heaters on past boats and feel this really is the best system to use on a cruising boat.
We have two enclosed heads each with a shower and on many occasions have had two guests showering at once while at anchor. We've never experienced any loss in temperature, volume or water pressure - using the PAR belt-driven pumps. I do need to keep the thermometer set at the halfway mark - otherwise the water would be scalding.