That's government by the majority, not the whole. Democracy is “a system of government by the whole population or all the eligible members of a state” (OED; emphasis added).
+ liberal democracies have (at least in theory) unalienable basic rights that can't be taken away, even by majority. Eg just because a 90+% majority votes to revoke citizenship from all muslims that doesn't mean that it will go through.
As for these "inalienable" right, I'm not aware of any system without a mechanism for altering their constitutional laws.
To your specific example, the UK just had a government representing a minority of voters vote through a law that allows them to strip citizenship from millions as they please.