ProjectName_API struct is undefined after changing project's name and regenerating Visual Studio Project files

I wanted to rename my UE5.1 project so I checked this guide → Rename Your Unreal Engine Project (Blueprints and C++) | Unrealistic

I followed every step in Code Projects section, I right-clicked MyProject.uproject and selected Generate Visual Studio Project files.
So far, so good.
However, when I wanted to open my project in UE5 editor, I foud that it wasn’t compiling. I opened Visual Studio 2022 to clean the solution and rebuild, in order to see the stack trace of the issue.

It seems that, for some reason, the class ProjectName_API was not defined. But it was never defined by me. Not when I used the old name nor with the new name. I think this class should be automatically generated when clicking Generate Visual Studio Project files.
Am I wrong on this? I’m pretty sure I never defined that class previously. So, why do I need to define it now? I’m not sure what’s supposed be in there.
Have anyone faced this issue before when renaming a project?