If you go to Insert > Shapes > More Shapes and pick Shape 1 (Name: corner_rectangle) or Shape 2 (Name: notched_rounded_rectangle), you get a box with individually adjustable corners, both in size and cut-out style.
Both are the same pattern shape, just different Names.

On top of either add a Text Line and give that a Name of "textLine". Soft-group with the shape.

Now we want the shape to grow with the height of any added text and when the Line length is altered (using the Text tool).

XDPX (sorry, not XWD(P) but do read on) has a Names gallery.
In that, change the drop-down to "Stretches". Tick the box to the right of corner_rectangle/notched_rounded_rectangle and then click on the small black arrowhead.
In the Extend <Name> pop-up, tick "textLine" and change both H&V dropdowns to "Extend" and then click the OK button.

You have created a stretchy object as used in Xara's stretchy buttons and my https://www.talkgraphics.com/showthr...45-Stretch-Van.

Here is the end result for a notched_rounded_rectangle design:
Shape 2 into Text Panel.xar

Acorn

P.S. XWD(P) users can still use and edit the design. All you can then do is remove either Name and break it functioning.
If you are smart (not in the Xara sense) you could apply these Names to different Shapes and have one extend the other H & V with the Names gallery - all smoke & mirrors in the end.