That’s not a compositing error. That TIE is flying from the foreground into the background, in an opposite directon to the Falcon.
Shouldn’t they still be behind the Falcon though, based on their size? They’re clearly too small to be in front of the Falcon.
If you watch the shot in motion, they start out much larger in the foreground and head backwards into the distance as the Falcon approaches from the opposite direction. I agree that the scale is a bit wonky, but the composition in terms of relative planes seems fine.