The doubled lām in إِلَّا belongs to the word itself; it is not caused by the definite article.
In الَّذِينَ, the article’s lām meets another lām and is assimilated, giving a doubled lām. A similar-looking shaddah can therefore have a different cause.
Do not decide the rule solely from the shaddah symbol. Compare the two words, then recite «إِلَّا الَّذِينَ» both as separate words and in a connected phrase.
Opening interactive controls...
Two different sources of shaddah
Al-ʿAṣr and At-Takāthur: Applied Ghunnah, Madd, Lām and Waqf
The doubled lām in إِلَّا belongs to the word itself; it is not caused by the definite article.
In الَّذِينَ, the article’s lām meets another lām and is assimilated, giving a doubled lām. A similar-looking shaddah can therefore have a different cause.
Do not decide the rule solely from the shaddah symbol. Compare the two words, then recite «إِلَّا الَّذِينَ» both as separate words and in a connected phrase.