Function keys can get "stuck" in the pressed state

Describe the bug
If you hold down the Fn key and press one of the Function keys (such as F2), it is possible to get into a state where the computer behaves as if that key is held down even when you stop pressing both the touchbar and the Fn key. If you press the Fn key again, you can see the function key on the touchbar is highlighted. Pressing the key on the touchbar again will stop it.

Affected input device (e.g. MacBook Trackpad, Magic Mouse/Trackpad, Touch Bar, etc.):
MBP with Touch Bar

Device information:

  • Type of Mac: MBP
  • macOS version: 10.13.6
  • BetterTouchTool version: 2.645

Additional information (e.g. StackTraces, related issues, screenshots, workarounds, etc.):
This "stickiness" cannot be reproduced without BTT installed. It seems to be centered around holding the touch of the key on the touch bar longer than you are holding down the Fn key.
While it is easy enough to stop once you realize what is happening, it can be quite disconcerting when encountering it for the first time as you don't even see the function keys on the touch bar unless the Fn key is held down, so you might hear keystroke feedback from the computer and whatever software you have active might be responding to a continuous stream of function key presses.