Canon has filed a patent that shows the sensor moving to improve contrast AF, as you can see in the image above from Northlight Images, the sensor moves back and forth.
Note the flexing element (blue) below the sensor (red), which bends to move the sensor part back and forth
Some of our articles may include affiliate links. If you purchase through these links, we may earn an affiliate commission at no extra cost to you.