Variable lost when not set to 'Editable' [REPRO PROJECT]

Please see this simple repro project, everything is explained in the starting scene:
SIMPLE REPRO PROJECT

Basically, in this example, variable is randomly set in construction script, and when ‘LOCK’ boolean is ON, it won’t generate new value, but just read the previously generated one. It works ONLY when variable is set to ‘Editable’.

Hi ,

This is expected behavior. When you move the actor in question, it is technically resetting the variable value to 0, because the actor is being destroyed and recreated, which resets the variable to a default value. By setting the variable to editable, it allows you to override the reset value with a new default value independent of the initial default value. When you have “Editable” unchecked, it always assumes that the default value should be 0, and that, if the actor is recreated, it should be 0. When checked, “Editable” allows you to alter the default value for that actor during destruction and re-creation.

Ah, now I understand, thanks!