I’ve struggled with this as well. Fortunately I’m surrounded by a friendly bunch of UE4 programmers - I asked one of them what the hell was going on with the order of the includes.
Basically, the wavey red error line is not to be trusted. It’s a good indication of issues, but it’s a bit flawed when working with UE4 - Visual Studio doesn’t always understand what’s going on. If you build / compile, your game should still run (provided you haven’t got any additional errors). My wavey red line normally sorts itself out at this point.
It’s a pain in the bum, I agree, but something you just have to get used to it seems.
During this discussion, it was also noted that includes should be kept in the .cpp file unless they need to be in the header file. I had been putting them in the header file thinking that it was cool, because the .cpp file includes everything from the header file anyway. This is bad for performance apparently.
edit Just to clarify - I’m not saying that you should put #include “PhysicsEngine/PhysicsHandleComponent.h” in the cpp file in this case, as it’s referenced in the header file. Just a general rule to avoid putting includes in the header file unless required