Got the definitive solution and here I share it!
Add this override to your UObject child class header:
virtual UWorld* GetWorld() const override
{
if (HasAllFlags(RF_ClassDefaultObject))
{
// If we are a CDO, we must return nullptr instead of calling Outer->GetWorld() to fool UObject::ImplementsGetWorld.
return nullptr;
}
return GetOuter()->GetWorld();
}