Your query is a bit confusing.
If after cancelling your RP you are going to exit Qatar and come back on a new visa, Your family must leave before your exit or leave along with you if you are the sponsor and their RP will be cancelled as well. You will not be able to exit with leaving your family behind.