For anyone wondering, I gave up with Electron.
At the end I made I simple WPF desktop app with C# with a WebView in it. So much more flexible and much more less work required to get it working properly. Probably this is not the right solution for everyone, but since I needed to run it only on desktop Windows environment, for me this was perfect.