The Deathly Hallows as Dumbledore states were actually created by three gifted wizards. And the master of them can defy death. But they are wizard-made and not given by death. Then how can any wizard-made object or spell defy death as Dumbledore states that death cannot be undone by anything?
The master of the Deathly Hallows can not actually defy death
That the one who unites the Deathly Hallows can defy death is merely the legend. Dumbledore seems to have believed the legend implicitly in his youth, for in Chapter 35 he states (my emphasis):
"And the Cloak... somehow, we never discussed the Cloak much, Harry. Both of us could conceal ourselves well enough without the Cloak, the true magic of which, of course, is that it can be used to protect and shield others as well as its owner. I thought that, if we ever found it, it might be useful in hiding Ariana, but our interest in the Cloak was mainly that it completed the trio, for the legend said that the man who united all three objects would then be truly master of death, which we took to mean 'invincible.'
However, as he became a wise old man he realized that this was not true. This is how he describes mastering death to Harry:
You are the true master of death, because the true master does not seek to run away from Death. He accepts that he must die, and understands that there are far, far worse things in the living world than dying."
Similarly, in his commentary to the Tales of Beedle the Bard, he explains that the true meaning of the story is precisely the opposite of defying death:
The moral of 'The Tale of the Three Brothers' could not be any clearer: human efforts to evade or overcome death are always doomed to disappointment.
In spite of the fact that, according to Beedle, two of the three objects are highly dangerous, in spite of the clear message that Death comes for us all in the end, a tiny minority of the wizarding community persists in believing that Beedle was sending them a coded message, which is the exact reverse of the one set down in ink, and that they alone are clever enough to understand it.
They don’t actually defy death, that’s just a legend about them.
As Dumbledore said, it’s likely that the story of the Deathly Hallows was a legend that had formed with its basis being the objects that the three Peverell brothers created.
“– were the three brothers of the tale,’ said Dumbledore, nodding. ‘Oh yes, I think so. Whether they met Death on a lonely road … I think it more likely that the Peverell brothers were simply gifted, dangerous wizards who succeeded in creating those powerful objects. The story of them being Death’s own Hallows seems to me the sort of legend that might have sprung up around such creations.”
- Harry Potter and the Deathly Hallows, Chapter 35 (King’s Cross)
The story of the Hallows seems to have exaggerated their power as well. The Elder Wand, for example, is very powerful, but not truly unbeatable as the legend says.
“What must strike any intelligent witch or wizard on studying the so-called history of the Elder Wand is that every man who claims to have owned it28 has insisted that it is “unbeatable,” when the known facts of its passage through many owners’ hands demonstrate that has it not only been beaten hundreds of times, but that it also attracts trouble as Grumble the Grubby Goat attracted flies.”
- The Tales of Beedle the Bard
The Invisibility Cloak is uniquely durable, but it’s not a shield from spells, and the Resurrection Stone doesn’t truly bring people back from the dead. They’re just very powerful wizard-created objects, nothing about them is shown to be impossible, or defy death in any way. They’re objects that it’s perfectly reasonable to think that particularly talented wizards could have created.