Also, make sure to check crank length. Many MTB bikes are sized with a longer length compared to a similarly sized road bike (because there is no 172.5mm length in MTB, and mid-sized roadies commonly use 172.5mm).
So make sure to account for that if you are using the same pedal / shoe combo. And if you are using a different combo, that is cause for adjustment. Not to mention that a different saddle may lead differ settings.
All that is to say that making the MTB “the same” may take some more consideration than simple dimension matching.