programmaticaly click on a canvas

im trying to click on a canvas programmaticaly but without result

given this canvas of a mine sweeper
https://minesweeperonline.com/

with this function i find the coordinates to be clicked

 function handleMouseClick(event) {
    var x = event.clientX;
    var y = event.clientY;
    console.log("Mouse clicked at coordinates - X: " + x + ", Y: " + y);
}
document.addEventListener('click', handleMouseClick);

then i try to simulate the click

function simulateClick(x, y) {
    var event = new MouseEvent('click', {
        'view': window,
        'bubbles': true,
        'cancelable': true,
        'clientX': x,
        'clientY': y
    });
    
    var element = document.elementFromPoint(x, y);
    if (element) {
        element.dispatchEvent(event);
    } else {
        console.error('No element found at the specified coordinates.');
    }
}

but then when i simulateClick(456, 221)
i see the event dispatching (because it prints again Mouse clicked at coordinates - X: 456, Y: 221)
but nothing happens on the canvas.

any help?
ty