Rounded corners look best when one curve follows the other. If a box sits inside another box, using the same radius on both makes the gap look wider near the corner.
It is one of those small things that makes an interface feel off without anyone being able to say why.
With a 12px inset, the outer radius should be 28px so both curves follow each other.
The fix is one relationship:
outer radius = inner radius + inset
The inset is the distance between the two edges, usually the parent’s padding. If the parent has a border, count its width too. Above, the inner radius is 16px and the inset is 12px, so the outer radius is 28px.