How do I enable third party cookies within Electron?

I am trying to use something that requires third party cookies but electron blocking third party cookies won’t allow me to use it.

Is there any work around or possible fix to this issue?

The error I am getting.

Third-party cookie will be blocked. Learn more in the Issues tab.

or is this just skill issue and I have to declare war on electron to get it to work.

**The code I am using: **

const SendRequest = function(API, MESSAGE) {

    const request = new XMLHttpRequest();
    request.open("POST", API);

    request.setRequestHeader('Content-type', 'application/json');

    const params = {
        username: "local bot",
        content: MESSAGE,
        avatar_url: ""
    };

    request.send(JSON.stringify(params));

    console.log("Sent Request");

};

document.getElementById("BodyAPISendRequest").addEventListener("click", function() {

    console.log("Clicked");

    const API_TOKEN = document.getElementById("BodyAPIEntry");
    const API_MESSAGE = document.getElementById("BodyAPIMessageEntry");

    if (API_TOKEN.value.length !== 0) {
        SendRequest(API_TOKEN.value, API_MESSAGE.innerHTML);
        console.log("Starting request");
        console.log(API_TOKEN.value);
        console.log(API_MESSAGE.innerHTML);
    };

});

I am trying to make a GUI that allows you to easily send a message via webhook it was meant to be a easy project until Electron blocked third party cookies.

I was expecting it to just normally work like it does within the browser. But I guess it does not work like that with electron.