Social media platform TikTok said it will release the code behind its algorithms work as the company remains under scrutiny for its security practices and ties to Beijing.