I reckon your flow needs to be higher.
It sounds like your on the borderline and just using enough flow, then if your voltage on your battery drops and the flow then drops a tad, the heater will cut out.
Try running it at 50 and see if the problem goes away.
These heaters do need decent flow and 40 sounds too low.
Also try turning the water dial on the heater right down as this restricts a little bit and creates back pressure which helps the boiler run in a lower pressure.