Body-target app embed blocks injected before the first </body> substring (breaks when a theme has </body> in a comment)

I believe this is a duplicate of:

https://community.shopify.dev/t/theme-app-extensions-injected-inside-html-comments-containing-body/