It is actually quite complicated. You know dà causes lenition. Well that should change the "lewar" to "lore". The sound change is small which is why it is not shown in writing. Not everyone pronounces them differently.
But there could be a further problem. If you are listening to the words recorded separately then maybe the system has no way to know which to use in a given context as they are spelt the same.
According to the LearnGaelic dictionary, leòr is one syllable and the "o" sound is held long and is said with a fairly open mouth, similar to "aw" in English "law". On the other hand, leabhar is two syllables, the sound in the first being short and said with a more closed mouth than in leòr, a bit like the "ow" in English "low", and the second syllable similar to the "er" in "runner". A crude transcription of that is that leòr is like "lyawr" with a long vowel and leabhar is "lyower" with short vowels. (Or if you read IPA, leòr is [ʎɔːɾ] and leabhar is [ˈʎo.əɾ].)
So you are saying that according to one particular dictionary they are different. Firstly they are not very different - if either of these words is two syllables then there has to be something between them to stop them sounding like a diphthong. But this could be on a sliding scale from virtually nothing a full-blown consonant. So there is bound to be a grey area where it is not certain if it should be marked as one syllable or two. The Scottish Gaelic Dialects Survey (compiled in the 1950s, but with non-standard notation) shows a whole range of options for leabhar, from a diphthong, to two syllables separated by - (which represents a syllable break) to a [ʔ] (glottal stop) as shown here and here. So I think the vowels could sound the same.
However, there is also a different problem here, to do with the l. In principle, a slender l sounds different if it is lenited, although the difference is not always audible, especially with people who learn spoken and written Gaelic at the same time (as they are influenced by the identical spellling). As they would be shown in a dictionary, neither is lenited, so both should be the same - quite possibly [ʎ] depending on dialect. But in this particular sentence, the l in leabhar should be lenited after dà, so it should sound different - perhaps [ʟ] - the so-called 'dark l '. If you go here you can hear all four sentences spoken by one woman, and the word on its own spoken by a man. Unfortunately Duolingo has no way to give two different out-of-context pronunciations for these homographs, and the man gives an unlenited pronunciation which is what you would expect. The leabhar_s in the four sentences are, unfortunately, all lenited (which I would consider an oversight). However, I have listened carefully and I would say that she is only leniting the l in the _dà leabhar, not in any of the other four sentences, including the one on this page. These four could, to me, be easily confused with leòr, but as leòr is not in the Duolingo dictionary there is no way I can listen to it to compare. D