Problem with unstable Tilt Sensor [Too short pins]

You are right in that the sensor pins are very short. And pushing the back won't completely solve that - I have the same project currently assembled and the sensor still pops off from time to time. But it's not as bad as it was when I had it over the unsupported section of the breadboard.