Long-term statistics not visible on History dashboard even when using 2023.12+

Is there any special configuration that one has to do in order to benefit from the “long-term statistics” feature announced in HA 2023.12?

I upgraded this week from 2023.12 to 2024.3.1 and I decided to try the new setup. I used to have this configuration:

recorder:
  purge_keep_days: 9999

I adjusted purge_keep_days to 30 and I then reloaded HA and let it decimate the database. Two days later, all database activity had stopped, but the History tab was showing no data beyond the last 30 days (whereas it used to be able to show data for the last year).

I gave up and restored from a backup because I didn’t want to lose all of that data. If I want to try this again, is there something I should do differently?