Yes in practice — the employer must stop (terminate) your social insurance contributions first, and only then can you settle and withdraw the individual account. This usually happens at the end of the final month.
Nationwide (all cities)
Stop first, then settle
The social insurance settlement for a departing foreigner presumes the insurance relationship has been terminated, which in practice means the employer must first stop the contributions. Shenzhen's official guidance reflects this: the company must stop the contributions before the settlement can proceed, and the stop usually takes effect in the last day or two of the month. The sequence is: the employment relationship ends → the employer stops (terminates) your social insurance → you apply in writing to terminate the social insurance relationship → the individual account balance is settled and refunded. The 'stop' is the employer's step, and the refund cannot be processed while contributions are still running, because the individual account balance is only final once the contributions stop.
Parallel with the housing provident fund
Note the parallel with the housing provident fund: there too the account must be 'sealed' (封存) before the account-closing withdrawal can proceed — the same 'stop first' principle applies across both pots.