Electron doesn't automatically exit when the last window is closed, and the Electron getting started guide (https://www.electronjs.org/docs/latest/tutorial/tutorial-fir...) recommends this code:

    app.on('window-all-closed', () => {
        if (process.platform !== 'darwin') app.quit()
    })
Most Electron apps probably do exactly that. It would feel extremely out of place for a macOS app to quit just because you closed a window.