Your sold holdings are bought back on the same day when you select MIS (Intraday) instead of CNC (Longterm) for selling your shares.
MIS creates a sell intraday position that must be squared off before market closure. If you don't square off the position, Zerodha may square off your position and charge ₹50 + 18% GST as auto square-off charges.
To sell your existing holdings, always select CNC (Longterm) to avoid creating an intraday position.