In such situations, international mechanisms for the protection of human rights come to the rescue. One of them is universal jurisdiction.
After the Second World War, the most cruel crimes - genocide, mass torture, persecution for views and beliefs - were singled out in a separate category of "crimes against humanity". Hoping to avoid the horrors of fascism in the future, the governments of the countries agreed to judge for such crimes, regardless of the place where they were committed.
Remember the situation from American films. As soon as the bandit, running away from the police, crosses the state line, the chase immediately stops with the words "we cannot arrest him, this is not our jurisdiction."