How can I prevent this from happening to my jeans

THe part in front of the zipper like moves out to the side and exposes the zipper. It really annoys me because it does it on its own. How can I prevent this?