Are you certain the warranty expired? Perhaps Apple has different legal obligations in your country but here in Canada/USA, they offer a one year warranty. That said, if the device is water damaged, it will not be covered under warranty regardless.
I have seen other iPhone X with water damage and the water seems to seep in by the earpiece speaker and or SIM card. That would definitely tend to attack the Front Cameras. But the issue may also be with the Illuminator/Sensor flex embedded in the display.
The problem with the X is that the FaceID is matched to the logic board so it is impossible to replace components and make the FaceID work again. If TrueDepth is the only thing missing, it may be something you'll have to live with unless you want to spend a lot of money on an out-of-warranty replacement.