A styleboxflat (like with panelcontainer) can have its corners rounded, you can then use clip in canvasitem to confine a children node to it. It's that simple!
You NEED themes if you use UI, it's the way of working in godot and it's really good, so look into it.