There's a good chance the loose membrane is to blame and affixing it in place would solve the issue. Before continuing, you can verify if the membrane is the issue or it's something else by powering the laptop on with the key and membrane removed, opening some kind of document on the computer, then using a toothpick or other small (non-sharp) object to push ...
To regain keyboard access to your machine to troubleshoot the fault and restore correct functionality, here are (2) options to get back into your machine:
Option 1: Wireless Keyboard
Buy a Wireless (USB) Keyboard which uses a USB dongle that looks like a USB Flash Drive that you can just insert into a USB port (or USB-C adapter) and it should "just work". ...
Sharing a solution to this problem, although it's pretty uncommon case.
Root cause of the problem was Karabiner elements setup.
They have a ticket open corresponding to this case:
What you need to do to start registering this hotkeys is essentially enable unknown devices in Karabiner settings.
The real question is: Is this a hardware failure or a software problem?
If it's a hardware problem, then you need to take it to an Apple Store or other authorised repair shop. There is currently a repair programme for known problems to some new models.
If you can get your hands on a USB keyboard, you can see whether that works, or if the problem remains.
These models are affected as of 2019-07-16:
MacBook (Retina, 12-inch, Early 2015)
MacBook (Retina, 12-inch, Early 2016)
MacBook (Retina, 12-inch, 2017)
MacBook Air (Retina, 13-inch, 2018)
MacBook Air (Retina, 13-inch, 2019)
MacBook Pro (13-inch, 2016, Two Thunderbolt 3 Ports)
MacBook Pro (13-inch, 2017, Two Thunderbolt 3 Ports)
MacBook Pro (13-inch, ...
This is a puzzler and at first I was thinking, "wonky keyboard or keyboard controller."
But before I go blaming hardware it would be best to see if the issue is related to software.
Most, if not all, keyboard customizations are done on a user by user basis and if they are not set in System Preferences they would be set by something that ran at login or ...
I know your laptop does not qualify for the apple keyboard repair program but you might want to take it in anyway. I've spoken with a supervisor before and talked them in to some repairs that absolutely should not have been covered. With so many people having keyboard issues they might be willing to do something.
Another thought is pay to have the battery ...
You can enable Favorites bar where each element has shorcuts like ⌘1, going from 1 to 9. When you keystroke shortcut of an inbox its message list gets focus.
If you have multiple mail accunts you have to use corresponding shortcut for each inbox. This is not as ergonomic as a single shortcut would be though.