I had this issue too yesterday. I just answered another question regarding this issue. https://discussions.apple.com/thread/250992377
For completeness, here is the solution in more detail:
What worked for me was to restart the "TouchBarServer":
- Open the activity monitor (cmd space and type activity monitor)
- Go to the "Disk" Tab and find the "TouchBarServer" process
- Select it and press the little stop sign with the cross in the top left.
Alternatively, you can kill the processes in the terminal with the following commands:
- Open the terminal, (cmd space, and type terminal).
- type the following and press enter: sudo pkill TouchBarServer
- Type in your password to give permission to kill the TouchBarServer.
I hope this helps!