Hey @kateryna_p
Looks like the schema has a target attribute to control where the code is injected.
> The value for app blocks is section. The values for app embed blocks are head and body.
https://shopify.dev/docs/apps/online-store/theme-app-extensions/extensions-framework#schema