Riemann Sum Integral sensor data lost after 2021.11 update

I’m not sure where to even begin this. Not sure if it’s caused by the update or if it is expected behavior.

I log my energy consumption data via MQTT every 10 seconds. The data is then added to the Riemann Sum Integral sensor and is then displayed in the Energy tab. I did this back in September, and just before the 2021.11 update I installed a few days ago, I could see my entire October energy consumption. However, everything up to the 2021.11 update is completely gone. Here’s my sensor:

sensor:
  - platform: integration
    source: sensor.kamstrup_power
    name: energy_spent
    unit_prefix: k
    round: 2

and to get it to show in the energy tab:

homeassistant:
  customize_glob:
    sensor.energy_spent:
      last_reset: '1970-01-01T00:00:00+00:00'
      device_class: energy
      state_class: measurement
      unit_of_measurement: kWh

I’m a bit annoyed that I lost this data, especially when I thought it was stored long-term when using that integration, but I guess it’s not. How do I make sure that Home Assistant won’t override/reset that sensor ever again? I want to keep that sensor’s data for many years (it’s literally just a number).