This is not true. It was true in 2019 when the PS5 was initially announced, but PS5 has been sold at a (slim) profit since 2021. Xbox probably sold at a loss for longer, but it definitely isn't sold at a loss in 2025.
The Switch & Switch 2 have always been profitable.
The BOM cost of the Steam Machine has been estimated at $450. They could sell for $500 and still be nominally profitable and still undercut XBox & PS5.
(That BOM cost estimate was before RAM price silliness so you have to adjust upwards a little bit).