Your selling price is not your budget.
At completion the proceeds settle the outstanding housing loan first, then refund the CPF you used plus accrued interest, then the selling and legal costs.
Only the remainder reaches you as cash.
Estimating what your own sale returns is worth doing before you plan around it.
The CPF portion is not lost. It is your retirement money being restored to your Ordinary Account, and it becomes available again for the next purchase — but it is CPF, not cash, and some costs only accept cash.