Below you can see the front-view size comparison of the Canon M50 and Canon RP. The Canon M50 is 17 mm narrower and 11 mm thinner than the Canon RP but it is also 3 mm taller.
The chart below depicts how two cameras compare with average dimensions of the cameras in their class.