After electricity meter offline for a long period, energy reports large negative spike

I have a Shelly EM monitoring grid supply to the house.
Due to electrical work on the house, the device was offline for a few months.
After being reinstated, the energy delta reported a large negative value:

The top graph show that the value from the sensor is increasing monotonically.
However, the bottom graph (change/delta) shows a large negative spike equal to the value of the sensor when the sensor came back online.

Is it because the last value was so long ago, that the change calculation is comparing some number with unavailable, which might result in unexpected behaviour?

Does anyone know what’s going on here; or have any ideas how to fix it?