Buttons are clicked when i click on a text away from the button but its a child of the buttong

Hello,

as in the title, when i press on the text which is not in the button shape range, the button is clicked.
note that it only happens if the text is a child of the button.
how can i make the button only pressed when i press on the button itself?

You can try adding CanvasGroup component to the text gameObject and uncheck the “Blocks Raycasts” checkbox