Using the loop key to disengage the vesc should not cause a problem. You have it wired correctly in diagram 2.
So, are you saying that your board is on all the time with the switch off or on?
If yes, then check the wiring for the e-switch and make sure the wires are not shorted together.
they could be touching together where they are soldered into the pcb or there could be a solder bridge there. The solder points for those wires are very close together.
If that looks good, follow the path of the wires all the way to the physical switch and see if they are touching together where the insulation is bare.
If that all checks, disconnect the wires from the physical switch and check it with a multimeter to make sure it’s opening and closing correctly.
BTW, where are you measuring the output?