Names are normally released when someone is prosecuted, unless they are a minor. It doesn't always seem to happen at the charging stage, which is purely a police decision, but once it reaches a court, it is public.
(There’s a huge amount of context and it’s a controversial move.)
'The judge said in his ruling that he had examined “raw underlying intelligence material” before deciding there was not a “real and immediate risk” to NX121 or his family if his identity was made public.
Lucraft said the three-month delay in naming the officer would allow for “the imposition of any additional mitigating measures to be put in place.”'
Source: https://www.theguardian.com/uk-news/2023/oct/30/met-officer-...