The NES light gun works with the properties the CRT provides... Roughly what happens is ... When you pull the trigger, the next frame is all black, and then one frame per target with a white square for the targer. If you're on target, the photodetector (photodiode? photoresistor?) will make a step change when the beam hits the white square, and the game code is looping to detect that. If the light comes late, it won't count; if it's not a big enough change, it won't count. If the screen was too bright during the black frame (or you were pointing at a light the whole time), it won't count.
Most modern displays are going to show the square too late, some might not be bright enough.
If you have an LED matrix and the right driving circuitry, you could probably replicate the timing, and that might work too, but I've not seen it done.
More details and options for LCDs https://www.retrorgb.com/yes-you-can-use-lightguns-on-lcds-s...