Chosen Solution

The tilde key on my 2019 Macbook pro keeps coming off. If I press the top half it is fine, but pressing the lower half of the key causes it to pop out. I assume something is wrong with the upper hinge/connector.

It might not be attached correctly or it might be broken. Try to find a replacement on this site: https://www.replacementlaptopkeys.com/. Apple Keyboards can be difficult to fix without replacing the whole keyboard but try to replace the single key with hinges first.