Many linguists agree that a linguistic explanation alone cannot adequately differentiate between languages and dialects because there are too many exceptions to these "rules." For one, the principle of mutual intelligibility cannot account for why speakers of Bosnian, Serbian, and Croatian can understand each other perfectly despite these being three separate languages.
Also, simply because two linguistic varieties have a high degree of shared vocabulary does not mean that they are dialects of the same language because this does not take borrowed vocabulary into account. There are many Arabic loanwords in Farsi, but these are two different languages belonging to two completely unrelated language families. Also, even two dialects of the same language can have extremely different vocabulary due to differences in speakers' education or social group.