Very few people voted for "leave" or "remain" per se. Instead, there are goals that they believed would be achieved by leaving the EU or by remaining in the EU, they thought about which goals were most important to them, and voted to achieve their most important goals.
There are two problems: One, the consequences of leaving were not completely understood. At an extreme, the problem with the Northern Ireland border was not something I saw mentioned before the referendum or actually quite a while afterwards (I am told that people in Northern Ireland were aware and wer laughed off). And two, the outcome of negotiations of a "leave" deal were not understood. Whether the leave campaigners lied, or whether they were overly optimistic, or whether negotiators were just incompetent, the "leave" deal is nothing like what "leave" voters expected.
So now, more than two years later, the consequences of "Leave" are much better understood. So the question is: Is it undemocratic to have a second referendum, where people can have a vote based on a much better understanding on the consequences?
There is another question that can be asked: Is it democratic to make a decision that will have a very long term effect based on a small minority, when the natural change of demographics alone would have created a different decision only a few years later?
When you say "people often say it is undemocratic", you will find that most or all of those people are people who still want to leave, for whatever reason, and who want to avoid anything that could derail Brexit. Among them are lots of people who said openly that they would want another referendum if Brexit had failed. So people making the claim it is undemocratic mostly do that for reasons that have nothing to do with democracy, but with achieving the result they want.
I would say there is nothing undemocratic about repeating the referendum with a much more informed public, who understands the consequences of their vote much better, plus more of the future generations who are mostly affected by this will have the ability to vote.