Fyi, on flying in (to repair my bike) I didn’t bother visiting the Customs at the airport and it seems there was no need (to complicate matters unnecessarily).
On leaving from RAK a week later (I was flying back later for the bike) I was sent back from the Immigration Police (the last check before entering the departure lounge) back through scanning to the Customs, as the system recognised I had a vehicle in Mk and I needed a new authorisation form.
That was easily done in an office right behind the Customs inspection desk on the right as you enter the scanning area (and where Customs occasionally stop you and ask about money and stuff).
This was not the harder-to-find Customs office out in the Terminal I used last time and mentioned above (pre-Covid).
With my old 2020 TVIP white card he did me a new authorisation in a couple of minutes but said when I came back (and before the end of 2021) I would have to renew my TVIP white card at Customs in Gueliz (a west Marrakech suburb) where the bike happens to be), prior to riding north for the ferry.
I went back through scanning and immigration where the Police kept the new Customs authorisation (white A4) and stamped me out.
Bottom line: the Customs authorisation to leave a vehicle in Mk needs to be re-issued each time you fly out (makes sense) but only takes a couple of minutes.
But to get your vehicle out of the country before the end of 2021 (or if you have left it here for more than 6 months due to Covid shutdown) you need to renew your TVIP at Customs in town.
Now 2023, post Covid and back to normal, leaving it more than 6 months is probably not a good idea.
The Gueliz office is here, just off Place de la Liberté (Mohamed V)
Added November:
The place linked is correct but the Douanes entrance is down the side street and left again through the big blue gates.
Wait to go into office - explain situation - he takes your small, white TVIP, puts # in the system and prints off an A4 TVIP update with a QR and ending Dec 31 2021, as mentioned earlier with regard to overdue Covid vehicles.
All took about 60 seconds.