Some possible thoughts (partly depending on the type of STP you're using):
1) If your legs are being forced closer together from your pants, it may make the STP "buckle" enough to be problematic
2) If the pants' crotch is putting pressure on the underside of the STP it may shift the seal a little
3) If the STP is being forced in an "uphill" position too much due to the fly or crotch being too high
STPs are notorious for being finicky.
What STP are you using? That might help us have more specific ideas. I'm assuming you have tried having the pants down at different amounts. I often have to have the button and zipper open then pull the front down about an inch (my fantastic gluteus maximus aids in keeping things from going all the way

).