To reach Marrakesh Mastery level 20 you need to complete the challenges to gain XP. I reached level 20 when I had completed around 50 of the challenges, so you don't need to complete them all. The challenges can be seen in the main menu and pause menu, they include tasks such as:
Starting in different locations.
Equipping disguises.
Finding items.
Completing different assassinations.
Escaping from different exits.
When you complete certain challenges, it will appear in the top right corner as successful. You now no longer need to finish the mission for them to save and for your level to update. You can reload saves to retry if you miss certain opportunities and challenges can still be accomplished.
I have uploaded several walkthrough videos which are mainly assassinations which get you around 5000xp each, but include me starting in different locations, finding items and changing disguises.
Don't Use That Tone
Don't Blow It
Drama Queen
Unhappy Ending
Personal Vendetta
Dance Till You Drop