Need help to fix a weird reinstanced related engine crash


Assertion failed: ((UObject*)ContainerPtr)->IsA(GetOwner<UClass>()) [File:D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Public\UObject\UnrealType.h] [Line: 714] 
'Default__REINST_SKEL_BP_Weapon_Gun_Child_C_240' is of class 'REINST_SKEL_BP_Weapon_Gun_Child_C_240' however property 'StaticMesh' belongs to class 'SKEL_BP_Portable_Basic_C'


UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_Engine
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_StructUtilsEditor
UnrealEditor_StructUtilsEditor
UnrealEditor_UnrealEd
UnrealEditor_KismetCompiler
UnrealEditor_KismetCompiler
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_Kismet
UnrealEditor_Kismet
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_ApplicationCore
UnrealEditor_ApplicationCore
UnrealEditor_ApplicationCore
UnrealEditor_ApplicationCore
user32
user32
UnrealEditor_ApplicationCore
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
kernel32
ntdll

My Engine Version: 5.5.4

Platform: Window 11

The steps to reproduce crash: class BP_Weapon_Gun_Child is child of class BP_Weapon_Gun which extends class BP_Portable_Basic and class BP_Portable_Basic is child of class Actor. There’s a custom blueprint structure called F_SlotItem where store information of item, and class BP_Portable_Basic use this structure as a member variable. So whenever this structure is adjusted, it will trigger the complilation of these blueprints related. I attempted to create a test sample with a structure similar to this one, but it’s ok, i think the problem maybe casued by class BP_Portable_Basic itself or other blueprints that reference it. But it’s all run well in PIE mode. None of the blueprints related had compilation errors. I don’t know where the problem lies.