Including file inside Plugin Source Code results in errors outside Plugin

Hi, I’m currently passing the source code that I’ve made inside a project into a Plugin to use it’s functionalities across multiple projects.
For this I went to the Plugins window and clicked NewPlugin, and Inside It’s Build.cs file I added the same dependencies that I had in the project’s source like so:

PublicDependencyModuleNames.AddRange(
			new string[]
			{
				"Core", "CoreUObject", "Engine",
                "InputCore",
                "AnimGraph",
                "BlueprintGraph", "AnimGraphRuntime", "UnrealEd"
				// ... add other public dependencies that you statically link with here ...
			}
			);

But when it comes to start adding the functionality, I just include “Animation/AnimNodeBase.h” inside the PluginPrivatePCH.h file, and It gives me the following errors in EdGraphNode.h, EdGraphPin.h, AnimStateMachineTypes.h, AnimBlueprint.h and CoreNetTypes.h

when I remove the previous #include “Animation/AnimNodeBase.h” It compiles fine again.
So I don’t understand at all why this UE4 source files are getting errors.
Any Help will be apreciated.

Tried doing the same procedure in 4.15 and turned out to work perfectly. I would like to know why this error happens in 4.14 but for now I can continue with what I was doing.