This is a bit of a tangent, but its a pet peve of mine
You are mixing up ICC and ICJ. South Africa brought a case to the ICJ. This is the country equivalent of suing another country so its not really forcing ICJ to investigate so much as south africa is presenting a case which icj will decide on (eventually anyways, icj is famous for being slow).
The ICC on the other hand makes its own decisions on who to investigate/charge. Countries can file referrals to it, but the ICC prosecutor has discretion on what they want to investigate and pursue.
[Anyone who thinks the ICC likes hamas should remember that the icc also filed charges against a hamas leader too. Its difficult for them to investigate hamas because they are only allowed to charge people who are currently alive]