I had this issue as well, although in my case it wasn't because of a comment after the enum name. I had the enums defined in the creation code of my first room. When I moved them to a separate .gml file, that resolved the error.
Room creation code / instance creation code in particular isn't currently being checked for enum definitions, as room files are much bigger (thus slower to timely parse on demand) than object/script files while it is relatively uncommon to have global declarations in them.