main.html's content is appended to iframe's <body>. The project name is in window.Bela.control.handler.project. For posterity, here is a minimal example where the default sketch is loaded alongside some extra html.
<style>
body {
display: block;
};
</style>
<script>
let guiHandler = window.Bela.control.handler;
console.log("LOADED\n");
guiHandler. loadSketch(guiHandler.project, 'head', document);
</script>
<div>My custom HTML</div>
the display: block is there to override the annoying default display: flex, which I have no idea why was there in the first place ...