From a functional compatibility standpoint, yes they are as it is the same silicon and the same IDCODE.
From a Timing Analysis point of view, this might not be the case.
If an XQ device is operated within the I-grade temperature range (-40 to 100C), then the XC and XQ bitstreams will be functionally and timing compatible.
They are only potentially incompatible if you operate the XQ device in the M-temp grade range (-55 to 125C).
Xilinx recommends targeting the correct XQ part in the software and regenerating the bit file.
It cannot be guaranteed 100% that an XC bitstream will work in a XQ device over the entire temperature range.
(Xilinx Answer 38221) - PlanAhead / Vivado - Choosing "I" grade makes the "XC" device disappear