A lower bound for the height of a rational function at $S$-unit points