/Engine/Source/Runtime/CoreUObject/Public/UObject/UObjectBaseUtility.h
Utility function to temporarily detach the object external package, if any GetPackage will report the outer's package once detached
void DetachExternalPackage()