Blueprint variables are reset when recompiling c++ code

I have a c++ blueprint with some variables defined like this.

UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (MakeEditWidget = true))
TArray<FTransform> fooTransforms;

I have been creating a couple of blueprint assets out of this class, and have been editing the default values. But if I recompile the class all the values get reset back to 0. If I were to add a boolean variable for example, the array would become empty. How do I avoid this?

Link to a project demonstrating this

Before uncommenting the bool and recompiling

After uncommenting the bool and recompiling

This happens at least in versions 4.18.0 and 4.18.1.

Similar threads mention double checking that the constructor does not default the values, but as you can see in the demo project, the constructor has only the default bCanEverTick variable set to true.