--x1: url(data:image/png;base64,PNG);
--x2: url(data:image/png;base64,PNG);
background-image: -webkit-image-set(var(--x1) 1x, var(--x2) 2x);
--1x: url(data:image/png;base64,PNG);
--2x: url(data:image/png;base64,PNG);
background-image: -webkit-image-set(var(--1x) 1x, var(--2x) 2x);

Chrome considers the second valid, which I think may be wrong. I'm not quite sure how to read the definition diagram, linked from here. It's a bug, but where is the question.
That ident-token regex railroad diagram shows that the identifier can't start with a number, so it seems that ST's highlighting/scoping is correct there. EDIT: although it also shows that variables can't start with two dashes, which makes no sense...
I've been informed by a Googler that Chrome is correct. This is addressed in an updated version of the diagram.
Most helpful comment
I've been informed by a Googler that Chrome is correct. This is addressed in an updated version of the diagram.