use transistor to switch on/off a window alarm
At a guess, your problem is the use of a TIP120, combined with the peculiarities of the alarm.

First, since the alarms are battery operated, I'd expect them to operate on very low current. This is possible with piezoelectric buzzers.

Second, TIP120s are designed to drive high-current loads with very little base drive, but they are not optimized for low OFF current (also called collector cutoff current), and are rated a maximum cutoff current of 0.5 mA with no base drive. I suspect that this is your problem. When off, they still allow enough current to pass to operate the buzzer.

There are two approaches you can take. The first is to recognize that, with low operating current, you don't need a high-gain Darlington device to drive your alarms. Try replacing the TIP120 with a 2N2222 or 2N3904. Alternatively, use your TIP to drive a relay of the appropriate coil voltage, and use the relay's contacts to drive the alarms.