I may be wrong on this (happy to be corrected) but my understanding is that the decisive moment is when the foot makes contact with the ball and NOT when the ball leaves the foot.
I find it unbelievable that they do not, in the first instance, view the incident (and show it), frame by frame to determine the EXACT moment the foot makes contact with the ball. Once established, then move on to draw the lines across the pitch to determine players positions and wether offside or not.
The difference between foot making contact with ball, and ball leaving foot, could make a huge difference in an attacking players position, as they move so fast.
If we're stuck with VAR it must be improved to determine exact moment the foot makes contact with the ball !!