Entity_id and unique_id messed

Hi !
I’m new to Home Assistant, still configuring and learning how it works.

I have a few curtains here (called “Persiana” in Portuguese/BR) which I configure them using my Broadlink to execute the RF433 commands.
So to execute these commands I need to create scripts for each command (open,stop,close).
I use the UI to create all scripts, there I was use the duplicate function, but later to make easy the maintenance of these scripts I copied the YAML to my scripts.yaml and exclude the scripts from the UI.
At first, all works fine.

So, in the last few days, I notice the buttons which execute these scripts on my dashboard begin gray and stopped to work.
I don’t know the exact moment that happened, I already upgraded my HA twice (2023.1 > 2023.4.1 > 2023.4.6) .

Investigating and looking at the entities I discover in the core.entity_registry a very messed up entitty, unique_ids .

Just one example, the script “Parar persiana quarto visita” have referenced for other scripts…
The script “parar_persiana_quarto_visita” is into my scripts.yaml was renamed with a _2 and that is why my commands stop to work.

Is there a way to solve this?
I ran my HA on docker, I’m considering shutdown it, edit the core.entity_registry manually and make all references correct or even exclude all them, since they are into my scripts.yaml and will be reloaded.
Any tips?

image

Just sharing, that I was able to solve this.
However, I did it in the not recommended way, editing files into the .storage

I also open an issue, since this appears to be a defect.