Is there any good method to migrate a C++ class into plugin?

I want to make some classes written in c++ into a standalon plugin so it could be easier to reuse. However in the project there are already a few blueprint assets derived from them and have their logic and properties. I have tried to copy and paste all cpp/h files into a plugin source file but it corupts all derived blueprint assets. Currently I only found one plugin here: GitHub - PipeRift/BlueprintRetarget: An small tool that allows retargeting invalid blueprints when its parent class is missing on UE4 but it clears all settings on components and causes tons of BP compile errors(maybe because it was from 4.21 version). Is there any ‘best practice’ for doing this?

I believe Core Redirects would be a good option for this.

Great! Things all works now except few variables in Animation Blueprint, but much easier to fix manually. Thanks.