Hard to say. Do we even have definitive figures for the amount of Xbox One consoles shipped? I do remember in the Epic/Google court case that Microsoft has not made profit from hardware sales. Compared to Sony, who initially losses money on hardware, they eventually made a profit on Playstation console sales down the line. I'm surprised this isn't the case with Xbox since both are similar machines.
Although, I guess it's not far fetched to assume Microsoft eventually made a profit on the Xbox ecosystem, with the shift to digital sales and subscription services happening midway through the generation.