Unreal doesn't allow me to create past a certain amount of classes

Ok, so I’m not new to Unreal engine and I have never had this issue before, and I have worked on projects that have more classes than the one I am currently working on.

So, this is the thing, let’s say I have 5 classes in my projects (of any type ie: actor, game mode etc) I can’t add a 6th class, regardless of what I do. For me to add the new class I will have to remove one of my existing class then it would work, but then I won’t be able to add any class after that.

Someone once had this issue in the past and resolved it by adding a macro to the projects .cpp file but his solution didn’t work for me.https://forums.unrealengine.com/t/updateresourcew-compile-error-after-adding-eos-sdk/468825/2


Here is a screenshot of the error I receive from the compiler, something about a macro #pragma optimize().
The Module.UE4_Atavism.cpp file is a file that’s automatically generated at compile-time to include some subset of the user-created cpp files. The new cpp files I added (that didn’t make the solution compile) is not on this list; however, I’ve tried adding it manually and it gets removed when I compile cause it is automatically generated.