C++ classes disappearing

I have the same problem and unfortunately all the suggestions here do not work.
The “modules” section is not missing in my .uproject.
I am using engine 5.0, btw. I tried switching to different engine versions but the cloning always fails with some errors.