You are correct the XA2 is within 1mm of the X, but it also just plain inferior to the X for just about every spec, CPU performance, GPU performance, screen quality, speakers, sensors, weight.
The only positive thing I can say about the XA2 is that it has a USB-C port vs micro-USB on the X.
I fully realize that the 5 II is the same size as the 10 and 10II but at least it can be considered an “upgrade” over the X, the 10 like the XA2 is no better then the X as far as the specs go.
The 10II may be a slight upgrade finally but it is a moot argument since the 10II is (at least today on 2021/2/7) not supported by SFOS.
We’ll see what Sony announces this week if the 10III or Xperia Compact that are rumored to be announced this week will finally be a true upgrade providing new equal or better features to the F512x.