Stop AI from detect player at a high place

I am making a stealth game. I got the AI perception system to works on my enemy AI. But the sight cone is too big, the AI can detect player from a point way above the ground. I don’t have an idea on how to fix this. Can anyone recommend some solutions?

On sight update: player Z location - AI Z location, If bigger than needed number don’t do anything.