Disable the sleep function of the macbook touch bar
You can use my script until Apple adds a preference for the Touch Bar.

It simulates keyboard activity by sending the command for the fn-key every 60 seconds. You should not notice it while typing. Keep in mind, however, that this will prevent display sleep / system sleep as well.

Copy and paste the following code into the "Script Editor" application on your MacBook Pro with Touch Bar:

(*
1. Save as an Application: Script Editor &gt; File &gt; Export… &gt; File Format: Application
2. Check "Stay open after run handler"
3. Run the app or add it to your login items: System Preferences &gt; Users &amp; Groups &gt; User &gt; Login Items &gt; Press the "+" button

# http://apple.stackexchange.com/questions/269174/disable-the-sleep-function-of-the-macbook-touch-bar
*)

on idle
    tell application "System Events" to keystroke (key code 63) -- press fn key
    delay 60
end idle


Please let us know if this solves your issue.