Open Search Everywhere / Find Action Dialog (Press Double Shift or Press Ctrl+Shift+A (Windows/Linux) or Cmd+Shift+A (macOS))
Search Registry
Start typing ide.mac.touchbar.enabled on Registry Dialog
Click on the checkbox to enable ide.mac.touchbar.enabled
Restart the IDE