Tldr: Depends on politics
Linguistics has historically been the most accurate
and politicised field of study when it comes to human migrations, relations and local/regional dynamics. Sometimes accurate predicitions and analysis often get shut down due to it invalidating some nationalist myth that a nation-state and/or ethnicity is based on. When it comes to incidences like Af Maxaa and Af Maay who are clearly related yet speakers of both languages have a tough time understanding each other than usually they get declared different languages who are related under a larger language sub-category (e.g. Semitic then Arab underneath it) but nationalist politics may see that get suppressed and we'll have it be classfied as a dialect. Chinese languages generally lack mutual intelligibility yet are classified as one language, contrast that with Scandi languages and Spanish and Portugese which have varying degrees og mutal intelligibility yet considered different languages. It all boils down to if your a nation state whether or not a language becomes a dialect or vice versa.