You've made two separate and distinct arguments for the baker having entered an agreement with the state:
(1) that everyone who sticks around is subject to and agrees to the laws of the land, and the baker sticks around; and
(2) that he agreed to the discrimination laws of the state in exchange for a business license when he registered to do business.
You understand that those aren't the same argument, right? It's argument (1) that I'm challenging on account of it being an unfalsifiable metaphysical claim with no connection to reality. Argument (2) is a perfectly ordinary legal claim we could check by examining a document on file.
That's not what I was saying -- see above -- but as a matter of fact he did register his business back in the 1990s.
so he never agreed to support/defend said law making it coercion. I hope I'm wrong.
The fact that he registered first makes no legal difference; it doesn't really make an ethical difference either since his original registration undoubtedly expired and he's had to renew it. It's not whether trans people were counted as a "protected class" at the time he got into this business that makes it coercion; it's the fact that Colorado will prosecute him if he sells cakes without a license that makes it coercion. But that's not to say that requiring licenses is illegal or wrong or a bad idea; sometimes coercion is a perfectly appropriate thing to do.
It is an error to analyze this situation using the inference rule "Coercion is bad; X is good; therefore X is not coercion." But unfortunately that's exactly how a great many people have been trained to reason. That's why so many people hear "X is coercion." and delude themselves that what somebody said was "X is bad." Likewise, to many people the impulse to avoid drawing the conclusion that X is bad is a massive barrier to accepting that X is coercion even when it's painfully obvious that it is. Phillips entered an agreement with Colorado to follow its rules, yes; but he entered it under duress. That does not mean he has no moral obligation to follow its rules. But it does mean that if he has an obligation to follow its rules, that obligation must be justified by something other than the fact of his agreement. An agreement made under duress is not morally binding.
Suppose you lived in one of those towns back in the 1800s with a No-Irish ordinance. Suppose you wanted to open a store there, and the town council made you get a license, and one of terms of the license was agreeing to follow town ordinances. Suppose an Irish customer came into your store. Do you think you'd have had a moral duty to kick him out, on account of your agreement?
This isn't to say that Phillips has no moral obligation to make gender-transition-celebration cakes. But it does mean that if you want to argue that he has a moral obligation to make gender-transition-celebration cakes, you need to base your argument on something other than his having agreed to follow Colorado's rules. You'd need to show bakers ought to be required to make gender-transition-celebration cakes even if Colorado didn't prosecute unlicensed bakers.