protractor.e2e-sepc.ts
import {browser, element, by} from 'protractor';
describe('Open the link', () => {
    beforeEach(() => {
        browser.waitForAngularEnabled(false);
        browser.get('url');
        browser.sleep(2000);
    });
    it('Click on more button', () => {
        element(by.id('more').click();
        })
    })
When I ran the above test case on chrome as a browser it ran succcessfully, but when I ran it with chrome --headless browser it fails the spec by displaying error as No element found using locator: By(css selector, *[id="more"])
protractor.config.js
multiCapabilities: [{
        'browserName': 'chrome',
        'chromeOptions': {
            args: ["--headless", "--disable-gpu"]
        }
}]