My MBP's touch bar turns off every time I close the lid Every time I close the lid of my brand new MBP, the touch bar (including the Touch ID) turns off and stop working, and only turns back on the next time I restart the computer.

I can't use the Touch ID to approve administrative operations or to unlock the computer, and I can't use the F keys or the touch bar functions at all...
Assuming I understand your question correctly, your MBP is working fine except after it's been in sleep mode. That is, after waking it from sleep, both the Touch ID and Touch Bar no longer work.

The first thing I'd try is resetting both the NVRAM and SMC (in that order). Before following the steps below, ensure you have no external hardware connected and that you're using the built-in keyboard.

Reset the NVRAM

Reset the NVRAM on your MBP as follows:


Shut down your machine. Yes, a full shut down, not just logging out.
Press the power button and then immediately press the commandoptionPR keys. 
Keep these keys pressed down for at least 20 seconds!
Let go of the keys and let your Mac reboot normally.


Note 1: When you log back in you may need to readjust some of your system preferences (e.g. speaker volume, screen resolution, startup disk selection, time zone information, etc).

Reset the SMC

To reset the SMC on your MBP, I'd follow these steps:


Shut down your Mac
Unplug the power cable from your Mac
For 10 seconds, press and hold at the same time the shiftcontroloption keys (on the left side of the built-in keyboard) and the power button
After 10 seconds let go of all keys and the power button 
Plug in the power cable
Turn your Mac back on with the power button.


After resetting both the NVRAM and SMC, use your computer to determine if the issue still persists. Let me know how you go.