Build Error Cannot open include file: 'NavFilters/NavigationQueryFilter.h'


I have been trying to package our project, but is giving me an error when building the package. In the editor the proyect compiles and runs fine, the problem comes when trying to create the package.

C:\Program Files\Epic Games\UE_4.21\Engine\Source\Runtime/AIModule/Classes/AIController.h(10): fatal error C1083: Cannot open include file: ‘NavFilters/NavigationQueryFilter.h’: No such file or directory

If I look for the file in the directory is there, and from visual studio it can be compiled and will open the editor normally.
I tried with both Unreal Engine versions 4.20.3 and 4.21.2 with the latest visual studio version ( Using Visual Studio 2017 14.16.27023 toolchain (C:\VS2017\VC\Tools\MSVC\14.16.27023) and Windows 10.0.17763.0 SDK (C:\Program Files (x86)\Windows Kits\10).)

Any help or hint what could be causing this is welcome, I run out of ideas.