Anyone who has actually sat down and read Leviticus with attention knows that while Leviticus describes sodomy as an abomination worthy of death for all human beings, various other Levitical commandments involve a variety of levels of individuals.
Some apply only to Jews. Others apply only to adult male Jews. Others apply only to male Jews of the tribe of Levi. Others apply only to male members of certain clans of the tribe of Levi. Others apply only to adult male members of a certain family of a certain clan of the tribe of Levi. Many apply only to a specific individual.
The laws regarding slavery only apply in circumstances where slaveholding is constitutive of the social order and Leviticus does not require any individual to own a slave.
It is also my understanding that the slavery of the ancient world was not the same as the chattel slavery of the modern Americas. Examples.
Slaves in ancient times could buy their freedom.
Slaves in ancient times were in many cases survivors of war who were sold as slaves rather than be killed.
Slaves were considered members of the household. Some were well educated and even served as tutors.
Families were not separated.
Some had willingly sold themselves into slavery to pay off debts.
I think that is some of the differences. I am not endorsing slavery but it is important to remember that what we think of as slavery is not what was known in the Ancient World. If you read the slave codes of Louisiana during its years as a Frech colony you will see this. Those slave laws had their orgin in the Roman laws on slavery.