"My mechanic said that all of the temperature/pressure sensors have to connect to ground to prevent shutdown, and he said they were."
Is he intimately familiar with that genset?
Typically (not universally, but most of the time) temperature and pressure sensors are simply variable resistors, with the majority of them having a resistance range from 40-240 ohms in the "operating" range. And again typically, most of the drop to 40 ohms in the "overheat" or "low pressure" condition. A true zero ohm reading to ground would be unusual--unless the sensor had shorted out internally.
I would suggest getting the correct technical information for your genset, either from the maker or whoever makes the senders, and checking them with an ohm meter to make CERTAIN of how this one is supposed to run--and how it is running.
I'd agree that something which the "bypass" switch normally bypasses, is defective. A very likely situation would be that the bypass switch DISconnects the oil pressure sender, allowing the genset to start up with zero oil pressure. If that sender was faulty...as soon as you released the bypass switch the genset would cut out.
Most likely it is something that simple, and if it is just a sender (sensor) then you need to confirm whether those sensors should ever be generating a ground, or what their correct operation is. Once you've done that--you may be able to test and confirm the problem by something really simple, like unplugging the lead to the sensor, or ground the lead to the sensor. (But don't just ground things unless you know that's going to be safe.)
One thing I've learned, is that you never can be sure a safety
mechanism (like a sensor) is working properly. Or, that any given maker used "typical" parts
. Some of them seem to go out of their way to use totally atypical ones.