Agent 47 can leave the mission area in a few different manners. Remember that using some of them require meeting some conditions first.
Using the army truck (M5,19) can be a perfect way to escape - especially after the double assassination with the APC's turret as your transport is near the turret's control panel (M5,24). To start engine you will need the army truck keys (M5,8). You can find them on one of the tables in the underground car park of the consulate, with an officer near them - so it's best to steal the keys after triggering the fire alarm which was required to evacuate Claus Hugo Strandberg. Escaping this way will unlock the Achievement "Get the Truck Out of Here!".
Gates at the market
There are two gates which Agent 47 can use to escape. One of them is exactly where you started the mission (by default) - in a roadside café (M5,22) - while the second one is near the market (M5,21). This escape route doesn't require any special conditions to meet - just approach the evacuation point and push the interaction button to see an outro of the Marrakech mission.
Consulate employees' car
The consulate employees' car (M5,20) is in the underground car park, in the place where you've triggered the fire alarm while using the Opportunity "Down the Rabbit Hole". To start the engine you need to find the employees' car keys (M5,7) - they are on the consulate's ground floor, in the first room on the right (looking from the main entrance). You don't even have to sneak - employees won't mind you taking the keys. Using this method to escape is rewarded with the Achievement "Floor It!".