How to dim one of these cheap 5mW laser modules?
These laser modules usually have a current source built in that (within limits) will deliver the same current to the laser at different voltages.
Also, below a certain voltage, nothing happens because the laser won't conduct, much like you see happening with an LED.
I assume your depleted batteries still deliver some current at a sufficiently high voltage, but not enough current for a bright beam.
So, to dim the laser, you will have to regulate the current, which requires modifying the driver or the driver output (reducing the current while staying above the minimum voltage), or using PWM.
You could try a potmeter and see if there is a range of resistance that will limit the current but doesn't drop too much voltage. Calculations would require specs.
You can try PWM at low frequencies (starting at, say 20Hz) and see what happens (it works for some), but higher frequencies usually don't work with these drivers; most have a capacitor at the input and output that make them react too slowly and filter away what you are trying to do.