After four tries, I've finally made the perfect cup of lentil soup. It turns out that there two important points to follow when making it.
First, it has to simmer. Even if the lentils are cooked, you need to keep simmering so that the ingredients come together. I used to turn it off when the lentils were cooked and it always looked like the ingredients were separate from the broth.
The second thing is to remove any scum while the soup is cooking and simmering. It's the foam that accumulates on top of the soup. Just spoon it out as it accumulates.
Cooking lentil soup is not difficult but these tips really do make a difference. It turns out much better.