I found that the issue roots in the value type, when I check the type of the data I tried to match it turns out to be.
TYPE_REAL = 3, Variable is of type float (real).
TYPE_INT = 2, Variable is of type int.
I don't know that Godot by default store enum value in TYPEREAL instead of TYPEINT, here's how I declare my enum:
so knowing that I simply need to explicitly tell Godot to match it in TYPE_INT:
And finally it works perfectly well. I don't know why in if statement it works anyway without me explicitly transform the value into integer.
Godot does not treat enum as float, it just that I use built-in parse_json function that parses all numeric values as float. And as @Magso said below The if statement works because it can work with both datatypes. That's it, becareful with that thing.