TikTok has agreed to withdraw a rewards feature that raised concerns about its potential to encourage excessive screen time, particularly among children, the European Union’s executive commission said.