If someone is forced to work for someone else and make something that is not the standard work that is offered, i.e. forcing an artisan to make something custom like a wedding cake then that is slavery. None of the bakers refused to sell their standard offerings to homosexuals. If they wanted a wedding cake that featured a man and a woman, they would have gotten one.
If you deal with the general public, then sure. If you are licensed to only deal with a specific organization (i.e. only a specific church) that shares your values, and if it is possible to succeed at business that way, then you aren’t violating the law.