Packaging plugin failed and requires to include basic headers

When I try to packaging my plugin. It always requires me to include basic headers such as:

include “GameFramework/Actor.h”
include “Engine/World.h”

If I use Actor, FHitResult, UWorld, I have to include that or else the plugin will fail to package. However, I can still compile and run the game with the plugin on the editor normally without any errors. I know it has something to do with IWYU but I don’t have more clue.

The IDE does not give any error about missing include and the engine compiles normally. But whenever I package my plugin, it happens.