There is precedent for the ICC [1], I believe a majority of all the ICC convictions were actually charging individuals committing crimes against their own people without crossing state lines.
The fact that China gets away with its treatment of the Uyghurs (and plenty of other major powers that technically break ICC laws) is definitely an example of how much international law is a farce, though they aren't getting around the ICC by staying within their own borders.
“Rule of law” means all people are equal before the law.
It’s hard to pull off. Some nations have, most haven’t.
But Chairman Xi isn’t going to face charges for his crimes against Uyghurs.
Most countries have no rule of law, and internationally, none do.