The law on photography in public places would likely need to be changed.
This article covers England and Wales. But this is pretty standard everywhere.
Your Legal Rights as a Photographer in the UK: What You Must Know | Frame & Focal (frameandfocal.com)
From that article -
"Under English and Welsh common law—and confirmed in R v. Bow Street Metropolitan Stipendiary Magistrate, ex parte Pinochet Ugarte (No. 3) [2000] UKHL 1—public highways, parks, and publicly accessible footpaths constitute lawful places for photography without prior permission. Section 12 of the Human Rights Act 1998 incorporates Article 10 (freedom of expression) and Article 8 (right to respect for private life), both interpreted by the European Court of Human Rights in Von Hannover v. Germany (No. 2) [2012] ECHR 294 to protect visual documentation as expressive conduct. Crucially, the Crown Prosecution Service’s 2022 Guidance on Photographing in Public Places states unequivocally: “Taking photographs in public is not, in itself, an offence.”"
I am not a lawyer, just an amateur photographer. And basically, the photograph belongs to the photographer, not the subject. So, anyone can take photos of people in public spaces and publish. But if a photo is taken in a private space, then the subject's agreement is usually needed before publishing.
So, I think if anyone takes photos of their kids in a public space, the law can't touch you. But in a private space, the law can.
But I suppose the kid can say they were under duress ?
But, it is more complex. Because likes of shopping centers and train stations are public space, but they are private property. So the owner can ban photography.