I’ve been riding road bikes for only a year, but mountain bike for 25yrs. if the road is fairly slack angled, 10% then the road bike is much faster. if the road is steep, theres some 25-30% unclassified roads around here, then you’d be better off with the lower gearing & smaller wheels of the mtb, despite the road bike being significantly lighter.
I’ve found the biggest training benefit of road bikes is theres never an excuse to stop pedalling. on a mtb its amazing how much freewheeling & recovery you have compared to road riding.