ByteDance’s AI spending weighed on first-half profit, while revenue growth accelerated as the TikTok parent’s US regulatory uncertainty eased, sources said.