Using generateVisualContent to add visuals, how to also affect effective bounds of the element?

Using generateVisualContent I add some visuals to my element - nice!

But now, since the visuals render outside the bounds of my element, if I add margin to my element, it can still overlap with others, because the margin is computed from existing bounds.

Any way to instruct the API to also change bounds of the element?

See this image:
9244476--1292199--Frame 9.png
My element bounds are the blue stroke. You can see my generated visual going outside the element.
How to instruct the API to add the section outlined with red stroke to bounds?

You could assign style minWidth/minHeight to account for the extra content.