Since the Thunderbird people just duped bug 1947722 (support for disabling hiding the Quick Filter bar on Esc keypresses) against bug 1922924 (disable Esc when filter settings are pinned), here's a little python-xlib hack for the ACTUALLY desired functionality by filtering events.
https://gist.github.com/ssokolow/74c8bda3dafc133e615e3152b815196f
Wayland users will have to force their Thunderbird to run as an X11 app via XWayland or Wayland's security model will prevent this from working.