Utility meter skipping counts on total_increasing sensors

Hi,
I have a daily utility meter that counts the energy produced by my solar panels. The meter uses as a source a template sensor with state_class: "total_increasing".

The problem is that if for any reason HA is stopped and then restarted, the amount of energy produced when HA was off is not counted by the utility meter, it just resume counting adding to the last number before HA was shut down. The source sensor instead shows the correct count, taking into account all the energy produced when HA was off.
I am pretty sure that this was working fine a couple of months ago.

Here’s an example. I turned off HA at aroung 11:42 and back on 11:49. Inv-Tot E is the source template sensor with total_increasing class, you can see that it correctly jumps up at 11:49, counting all the kWh produced when HA was off.

Here instead you can see the utility meter, it just ignores the energy produced during off time.

Here is the configuration for the utility meter:

daily_energy:
  source: sensor.inv_tot_e
  cycle: daily
  name: "Inverter TOT - Daily E"

and the source sensor:

- name:         "Inv-TOT E"
  state:        >-
                {{ [  states('sensor.inv_1_e'), 
                      states('sensor.inv_2_e'), 
                      states('sensor.inv_3_e') ]
                      | map('int', default='NaN') | sum }}
  availability: >-
                {{ ([ states('sensor.inverter_1'),
                      states('sensor.inverter_2'),
                      states('sensor.inverter_3') ]
                      | select('in', ['unavailable', 'unknown', 'none'])
                      | list | length ) is eq(0) }}
  state_class:  "total_increasing"

I am running HA 2022.5.2, thanks!