shaders recompiling when actor/component moves in editor

I am running into a strange problem which has the engine recompile an actor component’s shaders every time I move the object inside the editor, or change any other property of that actor. When moving the object with the editor widget, these recompiles even stack up, accumulating hundreds of recompiles…
The log shows the message:

LogMaterial: Display: Missing cached shader map for material WidgetMainMaterial, compiling. 
LogMaterial: Display: Missing cached shader map for material DirectionIndicatorMaterial, compiling. 

The actor is a blueprint actor which has a component written in C++, directly attached as an instance editable component. The actor itself does not have any blueprint logic, so the fault must be with the component code:
I want to be able to assign the material from within the editor, which is the reason for the setup. Interestingly, it does not happen when I move only the relative location of the component itself.
Does anyone have a pointer towards what I messed up?

The header file (shortened a bit):

#include "Components/SceneComponent.h"
#include "CoreMinimal.h"
#include "Runtime/Engine/Classes/Components/StaticMeshComponent.h"
#include "Runtime/Engine/Classes/Engine/StaticMesh.h"
#include "Runtime/Engine/Classes/Materials/Material.h"
#include "WindowLevel3DComponent.generated.h"

UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent))
class UE4_OCT_VIS_API UWindowLevel3DComponent : public USceneComponent {
  GENERATED_BODY()

public:
  // Sets default values for this component's properties
  UWindowLevel3DComponent();

  UPROPERTY(/*VisibleAnywhere*/)
  UStaticMeshComponent* WidgetMainMesh;
  UPROPERTY(BlueprintReadOnly, EditAnywhere, Category = "Materials")
  UMaterial* WidgetMainMat;
  UPROPERTY(/*VisibleAnywhere*/)
  UStaticMeshComponent* DirectionIndicator;
  UPROPERTY(BlueprintReadOnly, EditAnywhere, Category = "Materials")
  UMaterial* DirectionIndicatorMat;
[...]  

protected:
  // Called when the game starts
  virtual void OnRegister() override;

public:
  // Called every frame
  virtual void TickComponent(float DeltaTime, ELevelTick TickType,
                             FActorComponentTickFunction* ThisTickFunction) override;
};

And the relevant implementations:

UWindowLevel3DComponent::UWindowLevel3DComponent() {
  // Set this component to be initialized when the game starts, and to be ticked every frame.  You
  // can turn these features off to improve performance if you don't need them.
  PrimaryComponentTick.bCanEverTick = true;

  WidgetMainMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("WidgetMain"));
  DirectionIndicator = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("DirectionIndicator"));

  WidgetMainMat = CreateDefaultSubobject<UMaterial>(TEXT("WidgetMainMat"));
  DirectionIndicatorMat = CreateDefaultSubobject<UMaterial>(TEXT("DirectionIndicatorMat"));

  WidgetMainMesh->SetupAttachment(this);
  DirectionIndicator->SetupAttachment(this);

  bEditableWhenInherited = true;
}

// Called when the game starts
void UWindowLevel3DComponent::OnRegister() {
  Super::OnRegister();

  WidgetMainMesh->SetHiddenInGame(false);
  // WidgetMainMesh->SetCollisionEnabled(ECollisionEnabled::NoCollision);
  WidgetMainMesh->SetRelativeScale3D(FVector{0.1f});
  WidgetMainMesh->SetMobility(EComponentMobility::Movable);

  DirectionIndicator->SetHiddenInGame(true);
  DirectionIndicator->SetRelativeScale3D(FVector{0.02f, 0.02f, 1.0f});
  DirectionIndicator->SetRelativeLocation(FVector{0, 0, 20.0f});
  DirectionIndicator->SetCollisionEnabled(ECollisionEnabled::NoCollision);
  DirectionIndicator->SetMobility(EComponentMobility::Movable);

  if (WidgetMainMat) {
    auto dynaMat =
        UMaterialInstanceDynamic::Create(WidgetMainMat, WidgetMainMesh, "Widget Main DynaMat");
    WidgetMainMesh->SetMaterial(0, WidgetMainMat);
  }

  if (DirectionIndicatorMat) {
    auto dynaMat = UMaterialInstanceDynamic::Create(DirectionIndicatorMat, DirectionIndicator,
                                                    "Widget Main DynaMat");
    DirectionIndicator->SetMaterial(0, dynaMat);
  }
}

There are no other functions overridden…