Modifications I make to my packages don't save?

Every time I modify the BoneRendererUtil.cs code in the Animation Rigging package, the changes reset when I close and reopen unity, despite me saving the script.

Is there any way I can ensure my changes will be saved and remain permanent?

As TerryH said, in order to have the changes made to package scripts save, you need to copy the modified file into the assets directory, and it will overwrite the previous one.

However, copying the package is probably a bad idea, as the purpose of packages is that they can be updated independently of your project.

A better or more SOLID way might be to inherit the particular class you want to modify, and then override or wrap the methods you are interacting with.