The one with whom the child spent the most nights is the custodial parent and can claim the child as a dependent. From what you posted that would be you. The IRS doesn’t care what your divorce arrangement is. The custodial parent can give the other parent a signed form 8332 to give the other parent the right to claim the dependency and child tax credit. The custodial parent retains the right to claim EIC and child care credit as well as file as head of household if otherwise qualified.
Having written that, if you act contrary to your divorce agreement I suppose you could be sued for breach of contact. But that is beyond the purview of this tax site.