Migrate between 2 c++ projects

If I have an enemy AI blueprint named bot with c++ code attached in project A, how can I migrate both blueprint and attached code so the blueprint is functional in project B.

I’ve had issues with this as well:

So have others:

It’s been reported as a bug

My current workaround:
Pre-migration, unparent the custom class. Post-migration, recreate the custom files in the new project and reassign.