I'm assuming that Trump is currently opposing a 'ban' because it might look good to some of his potential voters. That is it would look like good policy to them and he doesn't want anything that looks like that happening.
https://www.bbc.co.uk/news/technology-53476117