Yes. The CTP Green Slip insurance is attached to the car. The residual value of the CTP Green Slip is generally factored into the sale price of the vehicle, so it is only fair that the new owner receives the refund. However, it is important that you complete the transfer of ownership with Roads and Maritime Services (RMS) at the first possible opportunity.
The owner of the vehicle as at 30 November 2017 according to RMS records will determine who receives the refund, so if you have not transferred the vehicle ownership into your name before that date then the refund will go to the previous owner.