That is because the returned string from button.ToString will not only be the name of the object in the hierarchy.
It will most likely be “Button (UnityEngine.GameObject)”
So in order to effectively compare the toString() of the gameobject to your manually set string, you need to trim the returned string first. One possible approach could be: