When a child is placed in foster care pursuant to article 5 of this title or Title IV-E of the federal "Social Security Act", as amended, all rights to current and accrued child support for the benefit of the child are assigned by operation of law to the state department. When placement has terminated, the assignment of rights to accrued child support shall remain in effect until foster care cost of care or maintenance costs have been reimbursed in full. Amounts collected pursuant to this section shall be distributed to the federal government, the state, and the county proportionately according to each entity's contribution.