One of the cool things I learned in school is that genes don’t really closely relate to body plans — or rather, that different genes can still result in morphologically similar, lookalike species that occupy similar niches, whether in the same place or scattered across the world.
In the case of beavers, “aquatic tree-felling rodent” worked well enough in both the Old World & New that they kept the same basic body plan despite genetic drift over time. Think sharks, cockroaches, etc. too — many different genes and species, same basic body plans (for the most part, with specialist niches within them though).
A lot of birds are like that too. When you think “owl”, that’s not really a species of bird, but a whole order of 200+ different species that look similar and often have the same “big-eyed, night-hootin’, rodent-killin’” body plan, but are still distinct species. And can you tell apart eagles and falcons readily? I cannot. But eagles are actually closer to owls, while falcons are closer to parrots.
These are actually distinct species. The beavers, for example, cannot interbreed, and when mixed, the American beavers can outcompete the Eurasian ones, screwing them over instead of, well, screwing them. This happened in Finland and resulted in a proposal to wipe out American beavers there…
The different owl species mostly don’t interbreed either. Sometimes they can produce fertile hybrids, but don’t typically do so in the wild, apparently because they like different kinds of music — their songs are different enough that they don’t recognize each other as potential mates, like in humans.
Then there’s the case of convergent evolution, when completely different lineages nonetheless end up looking similar over time, and occupying similar niches — like how wings appear in birds, bats, and pterodactyls, but good luck getting KFC to sell those. Or how crab-like things have independently evolved many times, and been lost even more times.
In the plant world, you have cacti vs euphorbia — superficially similar “green, spiky succulent things” that are completely different. “Snake-like lizards” keep showing up across distant groups (or more sciency version). Two completely different types of frogs both evolved poison by eating completely different types of poisonous ants on different continents. There’s many more examples like this across all of biology.
Basically, I think the overall principle (as far as I know) is that environments cause niches, niches require adaptations, and genes that result in successful adaptations in those niches survive — but there can be more than one set of genes that result in the same adaptations.
Our mistake (as scientists and everyday people, I mean, before DNA sequencing was the norm) was assuming the opposite: that morphology indicates relatedness. It can but doesn’t have, and there were many false relatives that eventually had to be reclassified once DNA data proved earlier assumptions of relatedness wrong.