Do NOT connect this water heater to a CFCI or AFIC Circuit. Why?
It's the ignition system
Your tankless water heater, like many gas-fired appliances, uses an electronic Direct Spark Ignition (DSI) system to light the burner instead of a standing pilot light.  This saves gas, but requires the electronics to generate a high voltage in order to get sufficient spark energy to ignite the gas reliably.  In order to keep the implementation from becoming too bulky or complicated, the high voltage is generated relative to the chassis of the appliance using an HV supply that is not isolated from mains earth, so that the spark igniter's counter electrode can be a grounded burner part instead of having to be insulated for the full ignition voltage.  This, in turn, trips up GFCIs and many AFCIs, since it effectively acts as an intermittent leakage path to ground.