I'm seconding
Mac442 's assessment. The "pin" is actually a big fat staple of sorts. Or horseshoe clip. While it could be loose, it's unlikely as it's more of a spring than a regular staple and if the staple is broken that's an issue, as well as if the groove of the inside piece gets damaged and doesn't hold the handle where it should be.
Is the movement at the joint? If so, it's likely broken on the inside. The shifter handle is a T-100 Terminator unit. Plastic endo-skeleton covered by a vinyl skin. The outer skin looks perfectly fine, until you start to move it. Then it wriggles. It may still function most likely, but you can move the top section of the shifter handle while the "neck" stays still.
At that point, the shifter handle is toast. With the difficulty of finding a non-functioning button and chrome trim handle bits by themselves nowadays, it's usually more TIME-efficient to purchase the entire reproduction handle and just replace it and move on. Oh, and maybe even cost-efficient, but I don't know. The complete T-handles aftermarket hover around the $100 mark usually, more or less. But if you priced out the GM parts to build one on your own, if you could even find them, you'd probably be breaking even or ahead by getting the repro. And being a run of the mill T-handle, nobody will notice it's an aftermarket. They look quite good. Have no idea of their durability, however.
Not sure what colors are available, however. I know they make the black/blue/claret ones aftermarket.