I get that Electron is undesirable, but what do you mean by unsecure? Also, can you list some alternatives if you don't want them building a desktop app in Electron?
Malware can sweep through the memory to find passwords by reading memory directly from another process' address space.
This is a risk in desktop software written in other languages and with other gui frameworks as well, no?