Every console loses money on the hardware, because you'll immediately make up for it with software sales. Stadia's still struggling with the latter part.
AFAIK Nintendo is not necessarily in the business of losing money on hardware, especially if you count accessories like their controllers. I'd need to see numbers to believe that they lose money on the Switch, I suspect that thing is profitable.
Microsoft recently confirmed that they have always lost money on their consoles (during the Apple vs Epic proceedings). In contrast, Nintendo usually makes a profit on selling their hardware.