For those not familiar with the Typst library, it feels important to mention there is an `attach` function which gives much more explicit control of sub/superscript type-stetting. I'm surprised the blog didn't mention this at all as an option.

Docs: https://typst.app/docs/reference/math/attach/