The default value of X is "Off" and it's generally discouraged to change it. If you really need to do so, change it back as soon as possible.
to do so refers to the act of changing the value of X from "Off" to something different, presumably "On". That is:
The default value of X is "Off" and it's generally discouraged to change it. If you really need to do so, change it back as soon as possible. (Correct)
However, it could be misunderstood as "If you really want to change it back - don't hesitate to change it back."
The default value of X is "Off" and it's generally discouraged to change it. If you really need to do so, change it back as soon as possible. (Wrong)
How to remove this ambiguity?