This is not a regression from 4.27.2, however, a similar issue was fixed in 4.26.
Generating a C++ class that is in a subdirectory generates the #include "Subdirectory/Class.h" instead of #include "Class.h" causing the build to fail.
The class is created and the build succeeds
The class is created with the wrong #include and the build fails
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-155993 in the post.