The HTML spec allows for periods (.) in an id:
However, using a CSS ID selector rule will not match correc
Since you are using id, you can also use document.getElementById() which checks the id value as a normal string and not a CSS selector. e.g. the following works too:
const myElem = document.getElementById("some.id");
The only drawback is, you can't limit the scope of search, like you could with querySelector e.g. someElement.querySelector(). but since Ids should always be unique, a document wide search with id is valid.