Try adding buttons using a plugin. Create one plugin in the tinymce.script.js file and add your button code there. In the tinymce.override.json file, add your plugin and button. Everything should work.