This is a misleading view of history. It is true that it was included in the foreign aid package, but the TikTok ban was also passed in an isolated bill in an overwhelming bipartisan manner beforehand.
90% of Republicans in the House voted for the TikTok ban alone. 73% of Democrats.