Why is the button not in the center? (I made the button in the center of canvas panel in widget

Once you anchor, set the translation of the element to 0 in the details panel. Than, to get it perfectly in the middle, set your translation to minus half of your elements x & y scale. E.g. Scale = 40, 30, translation = -20, -15.