Trace will only trace the ability of the first Pokemon that appears, unless you switch out and then you switch in again, you will keep the clear body ability until the battle ends. If you switch into another Pokemon with trace while its on 2 vs 1, then it will randomly trace one of the Pokemon's ability. This is the same way in double and triple battles, the tracer trace randomly.