The Guardian's title is a bit misleading I would say.
"[A UN spojesperson] can confirm that he is retiring today. He informed the UN in March 2023 of his upcoming retirement, which takes effect tomorrow. The views in his letter made public today are his personal views.”
So he steps down because he is retiring, not because of the genocide.