I've found the answer myself. Very dumb.
The problem is that I had deleted the .xml from within Construct 2 to add this file again (I was working with a single file project).
But, as you may have already guessed, removing the .xml also removed the corresponding code related to this file.
Because I was away from C2 for about a year I had forgotten about this consequence.