Ukraine has been in international negotiations to become party to the International Criminal Court for decades now. They seem to have been making steady progress, up until the outbreak of the Russian invasion in 2022.
According to the head of the Ukrainian President's Office, ratification is not on the table while the war is ongoing. If they were to ratify, they fear "the court would receive a bunch of statements from the aggressor country about alleged (I emphasize - alleged) crimes committed by our military. And the same International Criminal Court will be obliged to assess these events."
Given that Russia has long since left the ICC, and most of the ICC's participant nations are firmly on Ukraine's side in the war (and have already condemned Russia and issued warrants for Russian leaders), why would Ukraine be afraid of cooperating with the ICC?