Type 12 m2 and CO2 in separate samples. In each one, select only the final digit.
Apply the control to the intended digit
In Ulet use Home → Superscript for the 2 in 12 m2 and Home → Subscript for the 2 in CO2. Confirm that the surrounding characters and next word stay on the baseline.

Illustrated superscript placement.
Check how the destination represents the unit
Open the saved DOCX or the delivered PDF and read both examples. If someone will paste into plain text, test that path separately. Formatting applied to an ordinary digit can be lost in plain text, while a Unicode character is a different representation.

Illustrated subscript placement and baseline check.



