I am having this same issue.
Putting it in the root folder worked. Renaming didn’t do anything. Thanks!
I am seeing it on any custom templates. Even if the template is an exact copy of the page template with just the custom description on the top. I am seeing the additional line breaks being added after every special heading element.
I figured it out. Placed the modal right after the body opening tag and the z-index worked after that.