Using the Dock in Touch Bar

I love having the ability to duplicate your dock in the touchbar area, which saves lots of space on your screen. However, it's not very useful when you're working within a program that utilizes commands in the touchbar as well. The dock covers up these app-specific features. Is there a way to make the dock minimize in the touch bar if an app has dock buttons?