Enums in GDScript are implemented something like dictionaries internally (see docs), so the same operations on dictionaries apply for enums:
enum MyEnum {
FIRST_KEY,
SECOND_KEY,
THIRD_KEY,
}
print(MyEnum)
# (FIRST_KEY:0), (SECOND_KEY:1), (THIRD_KEY:2)
MyEnum.FIRST_KEY = 42
# or
MyEnum['FIRST_KEY'] = 42
print(MyEnum)
# (FIRST_KEY:42), (SECOND_KEY:1), (THIRD_KEY:2)
I think when you try to assign FIRST_KEY = 1
like that you're in situation of rvalue = rvalue
assignment which doesn't work, or perhaps the enum values aren't in sync with enum variables or something...
One would expect enum values to be constant though, oh well.