If you are a divorced or a separated parent, your child may still be a qualifying person for the Child and Dependent Care Credit even if you cannot claim your child as a dependent.
Per IRS Publication 503 Child and Dependent Care Expenses, on page 3:
Child of divorced or separated parents or parents living apart. Even if you can't claim your child as a dependent, he or she is treated as your qualifying person if:
The custodial parent is the parent with whom the child lived for the greater number of nights in 2020. If the child was with each parent for an equal number of nights, the custodial parent is the parent with the higher adjusted gross income. For details and an exception for a parent who works at night, see Pub. 501.
The noncustodial parent can't treat the child as a qualifying person even if that parent is entitled to claim the child as a dependent under the special rules for a child of divorced or separated parents.
Note that any link in the information above is updated each year automatically and will take you to the most recent version of the document at the time it is accessed.