The second option you have is the hiddenInset value for the titleBarStyle property. The only difference to the hidden style is that, with hiddenInset, the buttons have an inset-like style, but the overall behavior is still the same:
function createWindow() {
win = new BrowserWindow({ titleBarStyle: 'hiddenInset' });
win.loadURL(`http://localhost:3000`);
win.on('closed', () => {
win = null;
});
}
Restart your Electron application. When you check the positioning and style of the window control buttons, you will see something like this:
As you can see, this time, the buttons are above the application title in the toolbar.