Every time I close UE5, every c++ class is unparented from it's blueprint

As I stated in the title, every time I close or build a project in UE5, every c++ class gets disconnected from his parent blueprint.

When I try to open the blueprint editor it gives me an error saying “Blueprint could not be loaded because it derives from an invalid class”, and I can’t put the blueprint (pawn) in the map either because of it.

The c++ class files are still present and correct, is this a UE5 problem? Does anyone know how to solve it?

Does anyone know how to reparent a preexisting c++ class to a preexisting blueprint?

The c++ classes parented with blueprints get deleted automatically from the “C++ Classes” folder too… but the .cpp and .h files are still there… strange

So, I created a new class from the UE5 interface, and magically all the other classes appeared again, still the error was prompted when trying to open the blueprint editor for the parents…

I saved all, restarted UE5 and VS, now the classes are back and the blueprint editor is working just fine, it is possible that I did not save correctly the project before and it caused the issue