It might not be the name alone that got them the part, but it might have helped nudge the judgement of whoever was casting.
I’ve long wondered about whether Michael Lonsdale was cast as Hugo Drax in the James Bond movie Moonraker because Drax is described in the book as “aa Lonsdale sort of character”. I’m sure , if this tipped the scales, it wasn’t the only reason, but the coincidence is striking.
I just noticed today that the first person to portray Flash Gordon on the radio was character actor Gale Gordon.
And it seems odd that Christopher Reeve should be chosen to play the roles of Clark Kent and Superman, which were famously played in the 1850s by George Reeves.
Finally, the part of The Lone Ranger in 1981 went to the otherwise unknown Klinton Spilsbury, playing a part most famously played by Clayton Moore. They even had to dub all of his lines.
Certainly one would expect coincidences by chance to occur. My point is that human beings still had to approve the roles, and people are ruled in part by such similarities.
I’ve often wondered if Woody Harrelson got the role of Woody Boyd on “Cheers” because of his name. (From what I understand, the character was not named after the actor, the name was already set before casting began.)
How about Bela Lugosi in Plan 9 From Outer Space? Bela Lugosi was Ed Wood’s good friend and since his movie called for a vampire his name probably came up right away.
Abbott and Costello Meet the Killer Boris Karloff (1949) - Karloff also played himself in several TV series episodes, and was the obvious inspiration for his part as old-time horror star Byron Orlok in Targets (1968).
Australian actor John Howard played himself representing [to others who did not know the difference] the then serving Australian Prime Minister John Howard in one episode of the TV series The Games. This was not a coincidence but required as part of the plot.
Mark Lindsay Chapman was originally supposed to play John Lennon in a film biography, but lost the role because he shared a name with Lennon’s killer Mark David Chapman. Twenty-two years later, Mark Lindsay Chapman was finally cast as Lennon in a movie about Lennon’s murder.
Not quite the same name, but on an episode of the Murdoch Mysteries with the PM of Canada at the time, the real PM had a cameo. But not as the PM, as a desk clerk IIRC.
I was somewhat surprised to learn that the name and characteristics of judge Harry Stone from Night Court were set before Harry Anderson was chosen to play the role.
Pretty sure this isn’t what the OP is looking for, but when thee producers of the Mary Tyler Moore show were developing the character of Sue Ann Nivens, they had in mind “a Betty White type.” After considering various actresses, someone finally said, “How about Betty White?”
Absolutely the opposite of the OP, but Margaret O’Brien’s name was changed to Margaret when she was cast for the role of Margaret in “Journey for Margaret” when she was 5 years old. Her real name was Angela Maxine O’Brien. Similarly, '30’s actress Anne Shirley took that name when she starred in Anne of Green Gables, having worked in many movies under other stage names.
Pelle Hvenegaard was cast in the lead of the film Pelle the Conqueror. He was named after the protagonist of the novel that was the source of the movie.
Similar situation in “Love Actually”. Director kept saying he wanted an actress like “Laura Linney” for the role of Sarah . Someone finally said, “Well, why not just get Laura Linney?” And they did.