Donald Trump believes he can reach a "political solution" that could avoid TikTok being banned in the US.