The eye for an eye and tooth for a tooth stuff is about hitting a pregnant woman.
" If people are fighting and hit a pregnant woman and she gives birth prematurely[e] but there is no serious injury, the offender must be fined whatever the woman’s husband demands and the court allows. But if there is serious injury, you are to take life for life, eye for eye, tooth for tooth, hand for hand, foot for foot, burn for burn, wound for wound, bruise for bruise. "
So no.
“Anyone who beats their male or female slave with a rod must be punished if the slave dies as a direct result, 21 but they are not to be punished if the slave recovers after a day or two, since the slave is their property. "
The book is literally protecting an abuser from receiving any punishment. Its saying if a person does this, but the slave does not die, the book forbids that person from receiving punishment for beating their slave.
Its shielding the abuser from punishment; protecting them from punishment, if you will.