it has nothing to do with W4s. who do the children live with is a critical question to determine who claims the children.
run though this IRS tool and it will tell you what to do.
ps I infer from yuour question that their parents do not live together. if you are filing "joint" then it doesn't matter, the children are all on the same tax return,
As others have said, who claimed the kids on the W-4 does not matter at tax filing time.
If you and the other parent are unmarried and live together, either one of you (but not both) may claim the child. You may decide between you which one will claim the child. If you have more than one child, you can split them any way you want. Only if you can’t agree, do the IRS tie breaker rules apply, to see who has first choice.
There is no simple answer as to which is best. It depends on all the facts. For example, to claim Head of Household (HoH) filing status, the person must be claiming at least one live-in dependent. Generally, only the higher income person can be HoH. It may be worthwhile to prepare trial returns, both ways, to see which way the family comes out best. This tool may be useful: https://turbotax.intuit.com/tax-tools/calculators/taxcaster/?s=1.