Where did my Android Studio touch bar go?

I’m using the default touch bar setup for Android Studio on my Macbook Pro. For no apparent reason, and at random times, the default touch bar buttons (i.e. the build buttons) disappear and never return. All that’s left is the ESC key and system buttons. Tapping ESC does nothing.

I know that the touch bar is context-sensitive, but once it’s gone I can’t get the build touch bar back no matter which window or state I’m in. Only restarting Android Studio brings it back.

Is this a config issue or should I file a bug with Google/Jetbrains?

Android Studio: 4.0.1,
Mac OS: 10.15.6