After you file

The irs doesn’t care about a court order. They go by who the child has lived with the most for that year and whichever parent the child has spent with the most that’s the parent who has the right to claim the child.