Here's a photo of the connector after wrapped it with electrical tape and double-sided velcro tape applied to socket.
If you want to tidy up the wiring behind the trim and move the wire up to the top you can drop the glovebox trim down by removing the screw using a #15 Torx driver and moving the wire behind the tab of the fixed part. See second photo. Be careful not to pinch the wire when reassembling glovebox trim piece.
Note: As an alternative to letting the socket dangle or sticking it to the trim you could apply it to the underside of the glovebox or route out of site behind the trim up under the glovebox. You could probably even extend the wire and route it inside the glovebox.