Hi. I am about to be in a similar situation/position. I am leaving Qatar soon on a final departure which means cancellation of RP but first I went for police clearance. This is simply to make life easier when retuning to Qatar so that you don't have to do it when you eventually return within 2 years. I was told to inform my current company by email if I have accepted an offer in Qatar again so that they can start preparing the necessary paperwork (NOC) for the new company before I return. The new company will fly me in on a Visitor's Visa first and then I have to do CEID clearance so that transfer can take place.
If you already have a new job before you leave, you have the option of simply doing a transfer of sponsorship and request your current employer not to cancel sponsorship so that you can return on their sponsorship to prevent cancellation of RP/Residency. The transfer will only happen when you are back in Qatar. In my case, I do not have a job as yet so I am on a Final Departure/Cancelling of Sponsorship and ultimately Cancelling of Residency.
Currently, without the NOC, we are all on a two year ban and have to wait for two years so lets hope things change soon, maybe as early as November. Fingers crossed.
Hope I have explained things well enough and please take care. Remember, God is good.