It is recommended to study the MSA to be understood all over the Arab world because it is hard to tell which dialect is most close to it. Anyway, if you're a beginner learner, so learning either the dialect or the standard langauge would have the same degree of dificulty (as a beginner learner). But if you're intenting to go somewhere, that will require to learn their own dialect, yeah Egyptian and Levantine dialects are widly understood, but it would be difficult to communicate if for example you're planing to go North Africa. There are known to be difficult, but in fact they are not, as long as you're beginner in the whole langauge.
But eventually, it is so hard to say which dialect is close to the MSA, cause around 50% of words of each is taken from the standard language, but the other 50% are different to each respective dialect.
& Good luck