A federal appeals court has affirmed a law requiring the China-based internet company ByteDance to divest TikTok’s U.S.