If I understand correctly, you'd probably get what you want (a titleBar-less window) by changing the BaseWindowConstructorOptions preferences to this:
mainWindow = new BrowserWindow({
height: 600,
width: 1000,
titleBarStyle: "hidden", // this hides the title bar
webPreferences: {
preload: MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY,
},
});
There's more options here if you'd like to check them out under "titleBarStyle": https://www.electronjs.org/docs/latest/api/structures/base-window-options
Best, Peter.