For the front shifter, there are normally intermediate positions between shifts that allow you to move the derailleur cage slightly to one side, to avoid rubbing but without causing the chain to swap ...