Check that the jack is flush against the case bezel and/or there is a wide-enough hole around it (figure 1). In my experience, this tends to be a common cause of 3.5mm connectors popping out.
It is not uncommon for the jack of the front-panel module (figure 2) to be a recessed few millimeters behind the plastic of the case (figure 3), thus making it too deep for the connector to go in all the way. Even a few millimeters is enough to cause it to pop out from a little vibration (which computers provide in spades).
Also check the headphone connector itself. Some headphones have a lot of rubber around the connector which makes it difficult for it to go all the way in, especially with recessed jacks. (Interestingly enough, while looking for a photo of fat and thin earphone jacks, I found one with both (figure 4) because someone was specifically concerned about the difference.)
Figure 1: The left connectors are slightly recessed but have an indent in the case; the right connectors are flush against the case
Figure 2: A front-panel connector module with audio connectors
Figure 3: A front-panel with recessed connectors
Figure 4: Fat and thin headphone connectors