Can Shimano Rear Derailleur Lever Be Fixed?
Those are "stem shifters"

Problem is its not just a simple bolt.  There are washers in there that do the actual gripping and it sounds like they may be dirty or worn to not be holding so well.

If you're handy, take it apart completely, clean with solvent or citrus cleaner, and then reassemble in the reverse order.  Take lots of photos to assist with rebuilding.

If you're after a quick fix, take out the screw/bolt, squirt some "locktite" on the threads and reinstall.  Leave it a day to harden and then ride like normal.   Superglue (cyanoacrilate) can be used instead in a pinch.