A federal appeals court has rejected TikTok's bid to overturn a law banning the platform unless the company finds a new owner.