Home assistant operating system is a variant of what is called an immutable operating system. Meaning that when you make changes to any file in the file system of the root partition, any reboot, it goes back to its original state. This is by design and it keeps the provisioning of the operating system robust, reliable, and easy to upgrade.
If you want your changes to persist, you will have to find the way to store them in the data partition and then do what is called a bind mount of that file on top of the existing file. You can also run Home Assistant Container Edition under a regular Linux system, or you can run the Core version under a regular Linux distribution. And then you will get the benefits of being able to change any files persistently, but you lose the benefits of having add-ons.