No, that should technically work, unsure about how your class is setup though since you made a custom button actor and the “box” component could be anything.
Did you try using the plugins built in button class component? It should handle pretty much everything for you already, since you are new I am unsure if you knew that the class exists?