The flashlight will be of two types - one is ordinary, shines with a beam, the second is larger, illuminates the entire area around the player. Below is a rough (there is nothing to be done) diagram of how I see the lighting area of the flashlight.

The blue semicircle is the small flashlight, the red ellipse is the large flashlight. I hope, based on this illustration, it became more or less clear to you ...
Of these parameters, it should be true that with a small flashlight, opponents hiding behind will not be active (if they have not yet "noticed" the player), but with a large flashlight there will be a chance to "wake up" those hiding in the darkness.
In general, the point is clear - the engine needs to support dynamic lighting for features like my flashlight project to be possible.