It merely exchanges commercial banks' balances at the central bank for central bank paper, but does not offset the initial increase in bank deposits caused by the official purchase of foreign currency.
For sterilisation to offset the initial rise in bank deposits, the official paper must be sold at an interest rate that attracts nonbanks to withdraw deposits from the commercial banks in order to buy the official paper. This is rarely done because it would push up interest rates and attract more inflow.