My C++ classes disappear after reopening the project. Why?

Thx, Zeaf.
I just faced the same problem in 5.4.3 and your solution works.
I think this is obviously a bug and needs to be fixed quickly by Epic.