It’s hard to replicate the issue, there might be other things to consider. However, I also remember directly opening up the .uproject file was causing my assets with C++ class parents to be corrupted under specific circumstances. Regardless, you should get used used to launching projects via VS if you’re working with C++, since it’s the better practice.
I wanna add that in case you encounter an actual corruption, rather than rebuilding the project, regenerating the project files would fix the common issues.
Hope these help!