Can you please post a Before and After set of text using Code Block?
Actually, in your case, I guess you need to post a zip file of RTF files showing the Before and After, in order for us to see the superscript you want.
Having said that, have you looked at using the Apply Style to Clipboard action.
Here's a simple example macro to get you going:
MACRO: Create Superscript from Selection [Example]
~~~ VER: 1.0 2019-04-08 ~~~
DOWNLOAD:
Create Superscript from Selection [Example].kmmacros (2.0 KB)
Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.