Blueprints that inherit from c++ class brake on startup project.

Every time I close and open my project the blueprints that I have that inherit from my C++ classes break.
These are the warnings that I have when opening the project:

And if i try to open the blueprint a message appears saying that “the blueprint could not be opened because it derives from an invalid class”. The source code is still there tho. Am I missing some kind of configuration when working with c++ and blueprints?

You need to run your project from your IDE and best to turn off live coding. It is very fragile and tends to break projects.