The workaround is to add a icon.icns (for mac) and icon.ico (for windows) in the assets folder, but not a icon.png. The presence of the png causes the bug apparently. For a, yet unclear, reason, the Linux icon is generated from the icon.icns file, but only when there is no icon.png.
In Ubuntu, there is no launcher icon. This is caused by this bug in Electron-builder: https://github.com/electron-userland/electron-builder/issues/2577
The workaround is to add a icon.icns (for mac) and icon.ico (for windows) in the assets folder, but not a icon.png. The presence of the png causes the bug apparently. For a, yet unclear, reason, the Linux icon is generated from the icon.icns file, but only when there is no icon.png.