He can admit why he is doing it for voters. Politicians and their teams rile people up all the time while carefully crafting it different to how it is said. This is why it is not a quick court case. You can bet lawyers would be getting rich quick if it was easy to decide as unconstitutional.
Often the issue is both sides believe the same thing, that he is punishing a company. He punishing a government affiliation.
Unfortunately for Disney, they had a strength that was a weakness for this kind of thing. If the law does not specially say Disney, but rather local government regulation, than there is not a cut and dry case.
It can be messed up but still not unconstitutional.