If the bike works when the circuit is not broken by the switch, then to me it seems the easiest solution in the short term is to get rid of the switch and join the two wires permanently.
That switch is not waterproof and is getting water thrown at it from the back wheel so needs to go
regardless.
Certainly a wiring diagram and sorting out what has been done is essential as well