Yes check out race bikes from 15 years ago at World Cup level and it’s very much narrow bars, bar ends, long stem. Now stems are shorter and bars wider. Partly due to more technical tracks probably. Maybe a 29er geo thing too possibly?
Still not as short and wide as trail bikes though, but then you want the control that wider bars give and the quick steering you get from a short stem (works better with the slacker angles too). For XC racing you want a bit more stability that you get from less wide bars and a longer stem when you’re putting the power down.
It’s all compromises in the end but it’s worth playing around with different lengths and widths as you’ll probably find a sweet spot.