I am having this same issue on my multisite. I wish to export and import some shortcode XML between sites in the multisite. When I export, I see the script
tag in the XML. However, once imported, the tag is gone.
Thinking this might be an issue with a plugin, I tried the same on a minimal, local, multisite install and I get the same issue.
Wordpress 5.8 (although I was getting this problem prior, also).
Thanks.