To fix this, add a TARGET parameter to the embed code as noted below:
<div id="formhome">
<!--[if lte IE 8]>
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js"></script>
<![endif]-->
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script>
<script>
hbspt.forms.create({
portalId: "4000347",
formId: "829db39f-ecff-4155-96a9-41f9b6d899c3",
css: "",
target: "#formhome"
});
</script>
</div>