Default value of a function's input variable is not really updated unless we refresh the function node, save and compile

I’ve just observed a very weird and extremely bad behaviour of blueprints in Unreal Engine 5.3.2.

Basically, the actual default value of an input variable might not be updated, even if you think you’re updating it by changing the value in the “Default value” field of the same variable, and then compiling.

I was testing a function with different values for this input variable by changing the default value, because I wanted to set a sensible default value. After every change, I was compiling the blueprint. However, I was observing some behavior that was inconsistent with the values I was providing and I couldn’t figure out why until I found this misleading behaviour.

To be clear, I have no other variable, local in the function or global in the blueprint class, with the same name as the input variable of that function. I even tried to change the input variable’s name and this horrible behaviour continues. So, this is not a case of shadowing. It must be a case of caching, which is extremely horrible in this case, because, when I compile, I want my function definition, including its default values, to be updated.

The issue eventually goes away if I click to refresh the calling node, save and then compile also the blueprint where I call the function. But this is still so bad because Unreal Engine is not telling me that I also need to compile the calling blueprint - the compile button is green not yellow.

So, maybe the solution is just to modify the editor to tell you that you also need to refresh the nodes and compile the calling code. However, I am not sure. It depends on the implementation.