The game uses infrared technology (IR emitters and sensors) to track the gun's position.
Following up on Yorik's answer, I went ahead and checked for the repair manual for this game. As mentioned, older light guns had to figure out what happened when the trigger is pulled by the way of technical trickery. In particular, most older games had to hard-code in the timing of light boxes (in relation to a CRT) to figure out if a hit was made, and which target was hit.
Moving on from there, There's many other ways to track and trigger on-hit detection. For this version of Rambo, I've found the following PDF installation and repair manual for it. What's interesting to note is that the DX version uses a SAMSUNG 56"DLP, (Which looks to be like a micro projector, but the manual uses the term CRT often.) but the two guns can be tested and tracked in real time. Likewise, there's a warning on having similar cabinets near each other due to interference, but there's a FREQ setting to help remedy issues. (This is the first sign of the answer as Infrared emitters are not "on" all the time, but can be set to a wavelength for a sensor to pick up on.)
First up, the gun itself uses the SEGA TYPE II GUN SENSOR (JPT-2030). There's not enough information I can find about this sensor, but we know that the gun's position is tracked on the screen in testing. Looking though the rest of the manual, I find that there's a IR Hood and Senor on the bottom of the screen. There does not seem to be any other technologies (like gyroscope or cameras) in use for tracking, so I'm going to have to assume that this game uses Infrared emitters for everything.
It's the same technology that's used for the Wii in just about every way. The only difference is that without a gyroscope, the gun can only detect if it sees the emitters or not. If there's no sign of the emitters, then it assumes it's off-screen to reload.