Hi,
I tried to quickly locate if we fixed the -Clean after 5.2, I suspect it was broken and got fixed, but the ‘clean’ keyword is kind popular in the code base so finding a fix is not quick and it probably not really worth it anyways… If you are really that curious, you can do some Perforce archeology to figure out. Regarding your other issue about header files, I suspect some side effects with precompiled headers and unity build. Both has the effect of implicitly adding includes when compiling your .cpp files. Your plugin .h/.cpp file should always include the .h they need and not rely in a precompiled header or unity build to include the file implicitly. When you compile with the engine vs with the game you might be using a different .pch or a different unity file… and the includes will not be the same.
Otherwise, it can be some other subtility, but I would need more details about the error. Typical case are missing module dependencies or dependencies you should not have (taping into private headers somehow)… but I would not some example of error to help.
Regards,
Patrick