Your ox will be slaughtered before your eyes, but you will not eat from it. Your donkey will be stolen from you, and it will not be returned to you. Your sheep will be given to your enemies, and you will have no way to save them (28:31).
This pasuk is one of the many pesukim in this week's parsha that depict the punishments that will befall the Jewish people should they not keep the Torah. The Zera Shimshon points out that regarding each animal, the Torah changes its description of what will happen. The ox will be slaughtered in front of you, and you will not be able to eat it; the donkey will be stolen and not returned to you, and as for the sheep, you will have no way to save them. The Zera Shimshon explains these differences as additional nuances of each of these punishments in the following manner.
The Gemara (Baba Kama 79a) says that if someone steals an ox and slaughters it on the property of its original owner, as long as he did not remove it from the property, he is exempt. Therefore, the punishment that the Torah illustrates here is that the ox will be slaughtered in front of you - on your own property - and the offender will not be obligated to pay the required five times the value of the stolen and slaughtered ox. The owner may think that maybe he will at least be able to salvage some meat. But on this, the Torah says that he will not even have that.
Regarding the donkey, the Zera Shimshon explains the wording of the pasuk “Your donkey will be stolen from you, and it will not be returned to you” based on what the Gemara says (Baba Kama 94b), that when a robber comes to return an item he stole, Chazal are not happy with those who take the item back since it stops robbers from doing teshuvah. (See the Gemara.) Here, the pasuk is saying that the punishment mentioned is that even after the donkey is stolen, should the robber decide to do teshuvah, the donkey will not be returned to the owner, because, technically, the owner should not take it back.
Your sheep will be given to your enemies, and you will have no way to save them. The Zera Shimshon explains this based on the Mishna (Baba Kama 10:2) that if a garment is stolen from someone, and the robbers give him a different garment, he is allowed to keep it. Rav Ovadia Mi’Bartenura explains that this halachah is only relevant if the robbers were Jewish, but not if they were non-Jews. This is because if the robbers were Jewish, the original owner would give up hope, since in order to retrieve his stolen article, he would have to procure witnesses, which is not always possible. Therefore, the owner just gives up hope, and the new owner may now keep it. However, if the robbers were non-Jews, the original owner would not give up hope, since the non-Jewish court system often relies on an assessment of the situation without requiring witnesses. Therefore, the original owner does not give up hope, since he hopes he can retrieve his article.
With this, the Zera Shimshon explains the pasuk (...you will have no way to save them) to mean that even though the robbers will be non-Jews, and usually, one can get the stolen articles back in a non-Jewish court, still, the Torah here is saying that, regardless of this, you will not be able to retrieve them.