Thanks to the suggestion from user nickberckley, I modified the code and now the buttons added to each project are stored and deleted correctly.
This version doesn't allow saving created buttons, so they must be recreated each time the project is opened. I'm currently working on a solution to address this and add a feature to display a character thumbnail for animation.