According to a new report from a cybersecurity company, more than two dozen state governments have placed web-tracking code made by TikTok parent ByteDance Ltd. on official websites.