After searching a bit, considering the Q factor is not relevant, we can compare the chainlines given by shimano:
XT 2x crankset, FC-M8000-2 (non Boost), has a chainline of 48.8mm
GRX 2x crankset, FC-RX810-2 or FC-RX600-11 have a chainline of 46.9mm
Ultegra 2x crankset, FC-R8000, has a chainline of 43.5mm
We can first see that the difference between GRX and road chainlines is 3.4mm, not 2.5mm
Chainline difference between XT M8000 and GRX 2x cranksets is 1.9mm
Chainline difference between XT M8000 and Ultegra R8000/DA/105 2x cranksets is 5.3mm
We can conclude that a GRX 2x crankset will work better than a road 2x crankset with an XT 2x front derailleur, chainline difference being less than 2mm
After searching a bit, considering the Q factor is not relevant, we can compare the chainlines given by shimano:
XT 2x crankset, FC-M8000-2 (non Boost), has a chainline of 48.8mm
GRX 2x crankset, FC-RX810-2 or FC-RX600-11 have a chainline of 46.9mm
Ultegra 2x crankset, FC-R8000, has a chainline of 43.5mm
We can first see that the difference between GRX and road chainlines is 3.4mm, not 2.5mm
Chainline difference between XT M8000 and GRX 2x cranksets is 1.9mm
Chainline difference between XT M8000 and Ultegra R8000/DA/105 2x cranksets is 5.3mm
We can conclude that a GRX 2x crankset will work better than a road 2x crankset with an XT 2x front derailleur, chainline difference being less than 2mm