[4.6.1] TWeakObjectPtr loses references to instances when referenced blueprint is compiled

Still present in 5.2.1

I’m using a raw pointer and TWeakObjectPtr together as a workaround to avoid strong references.

// MyActor.h
UPROPERTY(EditInstanceOnly)
AActor* RawPointerActor;

UPROPERTY(BlueprintReadWrite)
TWeakObjectPtr<AActor> WeakPointerActor;

// MyActor.cpp
void AMyActor::BeginPlay()
{
   Super::BeginPlay();

   WeakPointerActor = RawPointerActor;
   RawPointerActor = nullptr;
}