The 3710 Modbus protocol supports both 16-bit and extended 32-bit registers (the register size is selectable from the front panel). 32-bit registers are used for large values such as energy values while 16-bit registers are used for other parameters, such as current or voltage.
The kWh is rolling over at 65535 since it is being read as a 16-bit register, but it should be a 32-bit value; only the low byte of the 32-bit register is being read. Changing the modbus read mode to 32-bit will provide the correct kWh reading.