It seems to me that this problem is related to the compilation settings of the game for web format. I am developing on gamemaker 2 and I have settings for how the game window will be placed on the site page. Maybe there is a similar option in unity. And also in the itch.io game cabinet I also saw settings that can help.