IANAL and also my memory on this point is rather fuzzy, but I believe it may also be the case that under such circumstances, the lawyer who has made such a false and defamatory statement is subject to civil lawsuit for libel/slander.
Lying to a judge is an incredibly serious offense for an "officer of the court" like a prosecutor or defense attorney in the course of a trial.
That's potential disbarment territory afaik.
Prenda Law is another example of lawyers getting a little too clever and running up against a judge who is as sharp as a razor and not keen on legal fraud.