I've been guilty of something similar in the past as well.
I found a Mr X who married a Miss Y and they had a child Z in Gloucestershire.
The extended family had lived in Gloucestershire for a long time so I thought that I had the correct people.
However, then, totally out of the blue, someone on Ancestry messaged me and said that I had that part of my tree wrong. I was so grateful that she reached out to let me know about my mistake.
It turned out that there was a separate Mr X who married a Miss Y and had a child Z but they lived in Oxfordshire. It turned out that the two Mr Xs were cousins with the same surname and the two Miss Ys were also cousins (or second cousins) with the same surname.
And they both named their child Z.
.
Stopping to think about, I'm always grateful if anybody challenges me on anything that is on my tree as it ensures that I go back and look at it again and either realise that I've made a mistake or I'm able to say, no, I am correct.
Something like that happened with my 3x great grandfather born in 1828. A person I was messaging on Ancestry happened to mention that other trees showed him as having different parents (distant cousins of his actual mother) and asked "Do you have sources to correct that record?"
That prompted me to go back and look at how I arrived at my decision and shared the baptism records and later census information about not only him but also the other men with the same name born locally around the same time that I had relied on.
This all showed that it was indeed the correct man that I had in my tree. Again, like with the example above, most of the extended family lived in Gloucestershire but this branch of the family had moved to Wiltshire and he only then later moved back to Gloucestershire.
.
But, having said all this, I'm always wary about saying anything to anybody else about their tree not being correct. I'm always happy to be told that I'm wrong, but I'm not sure that everybody feels that way.