It can't... but neither can a representative democracy, a constitution or any other such system of democracy.
Like the very point of a democracy is that the people (Greek Demos), govern/rule (Greek -cracy) themselves.
So if you want to overrule the will of a majority, that by default means that a minority of people rules. Because "sum total" - "majority" = 100% -(50+x)% = (50-x)% = "less than 50%" = "minority". Not a complicated math.
Which prompts a very serious question: Where would they draw their legitimization from? Like it's not consent, that's for sure, but what is it? Theocracy? Authoritarianism? Military Junta (=rule by force)? None aka Tyranny? Hereditary monarchies? Property? "Interpretation of Tradition" (=Pseudo-Theocracy)? Aristocracy/Technocracy (=rule of "the best", the "most ethical")? Bureaucracy and "institutionalism"? Any other suggestion?
Been there, done that. All of them had been far worse than any democracy. Like none of them cared for "minorities" in general, but usually only for ONE particular minority and that was themselves. Like that's close to the believe in a benevolent dictatorship and spoiler alert dictatorships aren't benevolent. Like even if the dictator would not inherently be an asshole the sheer magnitude of taking care of everything and getting to know the lived reality of every possible minority would be virtually impossible and so he would fail that task and be forced to generalize decisions leading to not giving too much thought about outliers but caring more for averages aka majorities (you know the groups most likely to overthrow him if he didn't)...
So no all known attempts to reduce the risk of "the tyranny of the majority" by force, would only just mean to give into an even worse "tyranny of a minority".
And apparently all proponents of the boogeyman of the "tyranny of the majority" have historically been involved in slavery and colonialism, mostly concerned with their own privilege and their status as minority. So not really proponents of equality but rather people concerned with conserving an existing inequality. Sure that's an ad hominem argument, in the sense that just because they were despicable human beings doesn't mean they didn't say something of substance. That being said, did they?
They are not wrong in that a decision that is only based in majority rule and doesn't figure in the perspective of a minority and doesn't give them the opportunity to veto, amend or even just comment the proposal can feel as tyrannical to that minority as a real tyrant's decision.
That being said, a) you could agree on a different mode of democracy. Like you could demand consensus, either in general or specific to certain topics, you could give everyone a voice to raise their complaints about something, you can have discussions and exchanges prior to a vote and so on. b) representative democracies and anti-democratic systems suffer the same problem... just worse. Like the decisions of the representatives might as well feel as tyrannic as that of a tyrant and here an even smaller set of the population has a say in that. Like a representative with a free mandate is essentially a tyrant bound not to the will of the people but just their own consciousness.
So the more transparent the process and the more people that are close to the decision making process and able to actively participate the less people you'd have for whom that looks like a tyranny.
And the other thing is, if a majority is out to discriminate a minority there's only so much pretty much any system could do against it. Like there's this incredibly stupid argument that if 2 wolves and 1 sheep have a vote about what they have for dinner than it would be sheep. The problem is that the two wolves have a 2/3 majority so they could even amend a constitution to say that and even if the constitution demands consensus they could argue "we abandon society eat the sheep and form a new one"... So this is equivalent to a collapse of society itself in which case a constitution would help you either. And if you argue that the sheep should just kill the wolves, to show them their place, then how is that different from the other way around, just that the death toll is even higher?
No at the end of the day the power of a constitution comes from the fact that at the very least a majority of people consider these ground rules to be useful. So stuff like equality before the law is something that both provides rights to the individual and takes them away. Like you aren't above others anymore but you're also not below other people either. And if you take a large enough group and look at them with regards to a multitude of aspects then most likely everyone is a minority in some regard, so having fundamental and universal basic rights is likely to be in the best interest of a majority.
You can of course pragmatically go on a limb and calculate "tolerance" to a system that is unjust but not unjust enough to be overthrown, but that's not something you should bank on lasting long.