Version: 1.45.1
Commit: 5763d909d5f12fe19f215cbfdd29a91c0fa9208a
Date: 2020-05-14T08:33:47.663Z (3 wks ago)
Electron: 7.2.4
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 19.4.0
Steps to Reproduce:
Does this issue occur when all extensions are disabled?: Yes
I suggest you report this to Apple itself, I do not think every app adds its own "ESC" key.
Btw newer macbookPro models have a physical ESC key :)
@bpasero Since vscode is setting its own touchbar icons, the ones specified by vscode are being used. I don't think this is an OS bug, it's just that vscode, being a programming tool, can benefit from an escape key -- where as most app withs custom touchbar icons, don't really need an escape key. Those arrows in my initially attached image are not standard OS controls, they're for vscode.
The workaround is to change "Touch Bar shows" to "Expanded Control Strip" instead of the default "App Controls" (in system settings). But that's a global setting, which doesn't actually make sense to use a fix here.

after upgrading to the latest i swore the escape key just went missing. got frustrating because there was no good way to close the intellisense popup.
turn out it was a problem with macos. fixed it with sudo pkill TouchBarServer
@mattkrick thanks! and @bpasero I stand corrected, guess this is an OS issue. Will file a radar
Before the weekend I finally applied the latest update/upgrade and today while typing some code felt something is missing and things were behaving weirdly... And indeed the "esc" key was missing. Made exactly the same photo as above but saw this issue here :)
As @mattkrick suggested, killing the touch bar worked, but all other apps had their proper touch bar settings except vscode...
Most helpful comment
after upgrading to the latest i swore the escape key just went missing. got frustrating because there was no good way to close the intellisense popup.
turn out it was a problem with macos. fixed it with
sudo pkill TouchBarServer