As refered to here :https://github.com/cetz-package/cetz/issues/740#issuecomment-2457796488
You can use a content frame to scale a circle or rectangle around text :
#import "@preview/cetz:0.3.1"
#cetz.canvas({
import cetz.draw: *
content(
(0, 0),
[cont],
fill: rgb(50, 50, 255, 100),
stroke: rgb("#000000"),
frame: "circle",
padding: 5pt,
)
})