You can sell shares and immediately use the sale proceeds to purchase other shares once the transaction has been completed on the market.
However, while sale proceeds may be used for further trading prior to settlement, the funds must have fully settled before they can be withdrawn or used for any non‑trading purposes.