That will always be the case in hardware. The switch to on will be messy, for example like this:
https://makeabilitylab.github.io/physcomp/arduino/assets/ima...