Here is how I manage my window except that the edges are not filled:
const { width, height } = primaryDisplay.workAreaSize;
mainWindow = new BrowserWindow({
width: width,
height: height,
frame: false,
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
webviewTag: true
},
icon: 'src/assets/logo.png',
});