A laser is light so there may not be a perfect solution. You can adjust sensitivity (since a laser is very "bright") and a filter (that only passes the laser bandwidth) may also help.
And, you can pulse the laser and only trigger when there is a high/low pulse at the correct frequency. But, that will only help with false-triggers. You can still get a "miss" if the detector is overloaded with sunlight, etc. Laser alarms work something like that... If you don't receive the correct data/pattern the alarm is triggered. (i.e. The alarm will be triggered if the detector is blocked or if it's flooded with light.)