You don't have to replace the whole thing or glue it. Here's what worked for me...
Inside the brake handle is a small black cylinder. And on the bottom of that cylinder is a little tab. The tab slots into the hole at the bottom of the silver button that popped off. The spring keeps everything tensioned so button moves in and out of the handle.
Here's a cross-section of the cylinder and tab that the spring and silver button fits on. The diagram isn't super accurate because the cylinder and the tab eventually connect, but you get the idea.
View attachment 237470
It seems like over time, the tab moves closer to the cylinder and thus doesn't do a good job of locking the button in place.
To fix the handle, you'll need to cut a shim and put it between the cylinder and the tab. That shim keeps the tab away from the cylinder so the button gets locked into place.
I cut my shim out of an old credit card. It needs to be as wide as the small black cylinder (~1/4 of an inch) and no longer than than the cylinder once it's inserted (start with 1 inch, but you'll have to trim to ~3/4 of an inch).
The hard part is getting yourself a little space to get the shim in there. What worked for me was lifting up the hand brake all the way, then slipping a little pocket knife blade in between the tab and the cylinder, then while the blade is in there, slipping the shim in there. Then pull out the blade, trim the shim, but on the spring and button.
The cylinder and tab will look like this when it's all said and done.
View attachment 237471