/Engine/Plugins/EnhancedInput/Source/EnhancedInput/Public/UserSettings/EnhancedInputUserSettings.h
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.
virtual void Serialize ( [FArchive](API\Runtime\Core\Serialization\FArchive) & Ar )