The technique is so straightforward and easy to use I had to translate it into English for others to learn from.
- Create a Button widget. Set its brushes to your non-rectangular button texture.
- Set the Button's Visibility to Non Hit-Testable (Self Only). This is so rather than using the rectangular hitbox of the button, we will be able to use its children to define what is hit-testable.
- Add a panel widget inside the UButton, for example an Overlay or CanvasPanel.
- Add widgets (for example Images) to the panel, and arrange them to create the hitbox you want, using angle, shear, padding, or explicit canvas coordinates. If you use Image widgets, you can their Draw As to None to make them invisible while still blocking hit-detection
- Make sure the Visibility of all the hitbox children widgets is set to Visible.
- You're done!
The button should now change to the hover state when player's cursor is over its children marked as Visible.
Thanks again to @MMAn_nin for this!