Same issue exactly!
I am using UE 5.0.3, and each and every time I launch the editor, blueprint who has c++ base classes just refuses to work! Same error:
Blueprint could not be loaded because it derives from an invalid class. Check to make sure the parent class for this blueprint hasn’t been removed! Do you want to continue (it can crash the editor)?
I can see the C++ classes in the editor, and everything is fine, also project is source-controlled, so no file changed whatsoever.
The solution was to close the editor, rebuild from VS and then re-launch the editor.
Is anyone even using UE 5? It has so many bugs it’s unbelievable.