As per their own documentation, Electron is not a web browser and should not be treated like one.
I understand that some may experience differences of opinion, but I regard it as sufficient warning when the developers of something warn that it should not be used as a web browser: https://www.electronjs.org/docs/latest/tutorial/security