Migrate energy statistics from one entity to another

I assigned new data to id 999 (checking before if it’s not already in the db)
followed by old > new and 999 > old.

I managed to move the data between ids just fine, however, after few minutes, next entry in short_term stats gets added with value 0…

I delete all the new entries with:

DELETE FROM "statistics_short_term" where metadata_id = 689 and created_ts > 1754421210.5

And after few minutes same repeats.

Any ideas what am I doing wrong?