It might depend on which bike you have, but as far as I know all bikes can be charged with the switch off. The charger goes straight to the battery management system (BMS, and then to the cells. I've not seen a bike that didn't have a switch between the battery output and the controller, which would have no effect on charging. The one thing you mustn't do is have the controller on while you charge because some chargers then can't detect that the battery's full because of the slight discharge to the controller even when the bike's not going.