But the names aren't the same. Freddy will be his full first name, your sons name is Frederick, with Freddie as a nickname. And her sons middle name will be John, your sons middle name is Jonathan, which is a completely different name, same as if it were girls named Ann and Analise.
Did her partner/baby's dad have any say in the name? Is Freddy or John a family name on his side?
Who knows what nickname her son will end up with, there's no saying he will go by "Freddy" day to day.
Does she even know your sons middle name? She's your neice, i have no idea what any of my cousins middle names are so theres a good chance she has no idea what your sons middle name is either and it's a complete coincidence the middle names will be similar.
As for the first name, you don't get "dibs" on a name, she might have LOVED that name her entire life and never saw herself naming a son anything else, and it was just coincidence you also loved the name above all others for your own son. for example, IF by some miracle i ever had a son (infertility and a bunch of hereditary stuff i could pass on so i wouldn't risk it) i would name him Leo. There are a few other names i really like, but Leo is the only one that sounds "right" and perfect and that i definitely love above all others. I wouldn't change that and name him something else if some family member suddenly had a kid and called him Leo, or named a pet cat that.
Maybe it's a name she only realised she liked so much after you using it for your son.
It could also be she majorly looks up to you and its a flattering form of admiration.