Yeah it seems RPG Maker isn't treating you well at all... I'm so sorry it's doing that to you. VERY strange also for electron to not allow you to use modern JS... something unknown is going on from a deeper level, I'm willing to work with you to try and get it figured out but maybe we should Discord from here, as we might need to do some *cracks knuckles* anti-jank special methods I've developed from dealing with my own "this makes no f*ing sense" problems xD
Though imo, you might be better using Godot