I saw some translators translate "in your absence from him" into "In deiner Abwesenheit von ihm" and some into "in deiner Abwesenheit zu ihm".
So which one is correct and do they have the same meaning in German?
Abwesenheit isn't really in that way. Firstly, the preposition to use if we want to use the absence as a measure of time would be während
Während deiner Abwesenheit...
It does work with the preposition von but not for people. It works for a meeting
Deine Abwesenheit vom/beim Meeting war unentschuldbar.
Your absence from the meeting was inexcusable.
But you cannot really be abwesend from someone. The main problem is that the person who is absent is also connected using von and that use is by far the more common one.
Die Abwesenheit von Peter...
So using it the way you suggested is quite confusing and to my ears it is on the edge of wrong. I'd suggest a different phrasing entirely
Während/als du nicht bei ihm warst
In der Zeit, in der du nicht bei ihm warst...
But that ultimately depends on context.