This is not a bug i think, the pitch is zeroed in function
/** Update direction AI is looking based on FocalPoint */
virtual void UpdateControlRotation(float DeltaTime, bool bUpdatePawn = true);
of AIController
In function Impl you can see the following part of code,You can comment it and recompile the engine or you can override the function in you custom controller and remove the below code alone
// Don't pitch view unless looking at another pawn
if (NewControlRotation.Pitch != 0 && Cast<APawn>(GetFocusActor()) == nullptr)
{
NewControlRotation.Pitch = 0.f;
}
I did second option and it worked well…