I could not find an official record of the court ruling referenced in the question until Lag provided a link in a comment.
Based on the news coverage, my guess was that the judge's reference to a "welfare minefield" in this context was about the child's emotional welfare (not about government benefit payments, the sense that Americans may first think of when hearing the word welfare).
Now that I have had a chance to look over the judgement, I think it is consistent with my first impression; it may also refer in part to how the situation complicates efforts of government actors, including the judge himself, to evaluate the welfare of the child. There are several references to the "welfare checklist" of §1 of the Children Act 1989.
The judge expressed feeling faced "with a 'minefield' in which there were potential harms to the children whatever decisions were taken" (§60).
It looks like the local authority became involved here because the child and his half-sibling were removed from the custody of their biological mother based on concerns about harm and neglect. The child and his half-sibling subsequently lived with the man named on the child's birth certificate as his father, under an interim child arrangements order. During the proceedings involving these children, the local authority became aware of the irregular circumstances of this child's conception and subsequently applied for a paternity test and declaration of parentage to be carried out.
Per the judgement, the birth mother and two potential biological fathers think that it is in the child's best interest, for the sake of his relationship with all three of them, to have the circumstances of his conception kept secret (§17), whereas the local authority proposed that the child has an interest in knowing his biological paternity (§21-22); among the evidence received by the court was a psychologist's report that warned that it may be more difficult for the child to learn this information at a later point in his life (§20), which of course might occur despite the parents' apparent current plans to keep it concealed from him forever (§67). These interests evidently conflict; even if we make a decision by weighing them against each other, it may be viewed as regrettable that this is necessary.
In other circumstances, "misattributed" paternity may theoretically be of financial interest to a government in cases where it holds parents responsible for financially supporting the care of their minor children: who is financially responsible then depends on which individuals are legally identified as the child's parents. A well-known case touching on that issue is that of Kansas sperm donor William Marotta. I haven't found a summary of the overall history of that case, but some background from 2015 in this article here: https://www.iflg.net/kansas-sperm-donors-liability-hinges-on-legal-technicality/ The article author Rich Vaughn opines:
In this case it seems the state has a bias to identify a parent who will be financially responsible for the child—regardless of whether any of the parties ever intended that parent to incur that responsibility.
And here is a slightly more recent news article from 2016: https://www.cjonline.com/story/news/crime/2016/11/28/shawnee-county-judge-topeka-sperm-donor-william-marotta-not-legally-child-s-father/16565815007/
But I doubt cases of this type have any more than a negligible impact on government finances.