Waitforelement failed when running chrome headless

Hi,
When I run a script on chrome headless the any waitForElement methods are not waiting until its passed and my actions after the wait are failing. If I run the same script with chrome then its working fine no errors.
I tried all wait methods that WebUI has and also used Explicit Expected conditions waituntil methods but no luck.

TestObject menuObj = CustomKeywords.‘ciautils.ciaUtilities.makeTOwithXPath’(’//div[contains(@class, ‘navigation-wrapper’)]//li[contains(@class, ‘navigation-menu-item’)] /a’)

WebUI.waitForElementHasAttribute(menuObj, “href”, 20)

Browser config:
browser = Chrome 79.0.3945.130
platform = Windows 10
seleniumVersion = 3.141.59

I need to make sure the script runs with no issues on headless so that I can use this script in jenkins to run.