Open a blank project, compare the standard blank index.html from a default project to your custom index.html. When using a Mendix 3 or 4 theme, it's better to start all over again because the HTML structure and classes have been improved drastically.
Also see release notes: https://appstore.home.mendix.com/link/modeler/5.0.0-beta6
I found that going to Project > Settings > Model and then selecting Default in the Theme dropdown cleared the error.