I found the problem and its solution. I had to disable "Automatically remove unused assets when compiling" in the Game Options. Now everything works fine. Wish I found it sooner, would have spared me a lot of recompiling while position some draw_line() and draw_rectangle(). 😅
Viewing post in "variable_struct_set: illegal to use empty names"
I checked the full log of GameMaker and found those lines:
-------------------------------------------------------
NOTE: 9 Unused Assets found (and will be removed) -
GMAnimCurve :: stanncam_ac_bouncy, stanncam_ac_linear
GMObject :: obj_stanncam_zone_1side, obj_stanncam_zone_corner
GMSprite :: spr_pixel_side_Underwater, spr_stanncam_zone_1side, spr_stanncam_zone_corner, spr_tile_bg, spr_underwater
-------------------------------------------------------
I'm not sure, what GameMaker tries to remove here, as some of the elements don't even exist in my project, e.g. spr_tile_bg or spr_underwater.