Below you can see the front-view size comparison of the Canon M6 and Sony A6400. The Canon M6 is 8 mm narrower and 15 mm thinner than the Sony A6400 but it is also 1 mm taller.
The chart below depicts how two cameras compare with average dimensions of the cameras in their class.