magento2 – Magento 2.3.6 is removing Html closing tag inserted by Custom JS in Block

Something strange is happening and probably I’m missing something realy simple… but can’t understand what:

adding a custom js in a block, that add an element to the DOM. The element has several children, and I’m opening and closing tags of each children.
However, when I run the script the closing tags are gone, and all the children are embedded to each other (and I’ve checked debugging from chrome console)
I’ve tested this simple script as an example:

const parent = document.getElementById('#parent');
parent.innerHTML = "<div><div>sibling1</div><div>sibling2</div></div>";

It should render:

<div "#parent">
    <div>
        <div>sibling1</div>
        <div>sibling2</div>
    </div>
</div>

but I see all the closing tags are gone when I debug it:

parent.innerHTML = "<div><div>sibling1<div>sibling2";

which results in

<div "#parent">
    <div>
        <div>sibling1
            <div>sibling2
            </div>
        </div>
    </div>
</div>

What is happening? What is eating up my closing tags?

I’ve testes several ways to generate this innerHTML and always ends up the same.

thank you!