Diagnosis
The clamp's locking mechanism is either obstructed by hair/product gunk or the plastic latch is worn/broken.
How to Fix It
First, clean the clamp thoroughly. Unplug the device. Use an old toothbrush or cotton swab dipped in rubbing alcohol to scrub the interlocking teeth of the clamp and the hinge area. Let it dry completely. This often removes sticky residue allowing it to latch.
If That Didn't Work
Inspect the small plastic hook on the clamp arm. If it's chipped or visibly worn, the clamp won't hold. You'll need a replacement clamp or barrel assembly.
Heads Up
Forcing the clamp closed on too thick a section of hair can stress and break the latch. Use smaller sections.