The IRS actually does care what is in the divorce decree, and the parent listed in the divorce decree controls the deduction/credit for the dependent (and can give it to the other parent year to year too). For the IRS, the child can spend 100% of the time with the NCP but if the divorce decree awarded the deduction to the other parent, that’s what controls.
NOT SO for the FAFSA, and the FAFSA doesn’t care what the divorce decree says. FAFSA has a definition for custodial parent and that’s who the child spends the most nights with.