You may have five friends named Leah. Each one is distinct in your mind—the blonde, the one always laughing, the one at work and so on. But you cannot do that in a book.
Think back to school days when you studied all those King Louis in France. I bet you can scarcely keep track in your mind now of which was which, apart perhaps from the Sun King.
This is what happens to readers when character names in a book are confusing. Sure, it occurs in real life, but in a book it’s a really bad idea to have a Tom and Tim, or two Freds, or even Mr. Holden and Mr. Howden. The readers will get confused and your story will lose its impact while they’re flipping back over the pages trying to get the characters clear in their mind.
And never repeat a name in a different book, unless it is the same character reappearing. A secondary character named Julie, in two different books, when they are totally different people will confuse your readers too.
There are plenty of baby name books out there. Give every character a distinct name.