Because the key mapping profile is serialized as a subobject of theUEnhancedInputUserSettingsand requires some custom serialization logic, you should not override the Serialize method on your custom key profile. If you need to add custom serialization logic then you can create a struct UPROPERTY and override the struct's serialization logic, which will prevent you from running into possible issues with subobjects.