'Referer' not set with onBeforeSendHeaders but 'User-Agent' is

I’m trying to set the ‘Referer’ header for all requests from Electron:

// main.js
const { app, BrowserWindow, net, session } = require('electron')

function createWindow () {

    ...

    // Set the Referer for all requests (and test User-Agent)
    session.defaultSession.webRequest.onBeforeSendHeaders((details, callback) => {
        details.requestHeaders['User-Agent'] = 'THIS IS SET - Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0';
        details.requestHeaders['Referer'] = 'https://my-domain.com';
        callback({ cancel: false, requestHeaders: details.requestHeaders });
    });


    // Make a test request - User-Agent is received but Referer isn't!
    const request = net.request({
        method: 'GET',
        protocol: 'https:',
        url: 'https://destination-domain-that-sees-no-referer.com'
    });
    request.on("error", (err) => { console.log("Error: " +err.message); });
    request.on('response', (response) => {
        response.on('data', (body) => {
            console.log("Headers: " + JSON.stringify(response.headers) );
            console.log("Body: " + body);
        });
    });
    request.end();

    ...
}

But the ‘Referer’ header isn’t received at the destination (the modified ‘User-Agent’ is).

If I make the same request via Postman with those request headers the Referer is received.

Any ideas? Thanks )