MT9V034 Gain between different sensors

We have developed some code and the hardware and lighting is very consistent. Yet what I am seeing is that between units (openMV H7 plus & MT9V034) the brightness is different even though the same settings are applied. I wouldn’t think that this is a sensitivity issue between sensors.
Currently have code that is fine for 2 units but on another unit I have to change the gain to 12 and increase the illumination to get to a point of similar results.

Is there another way to go about configuring the sensors to ensure that between sensors I get similar results?

Below is the code.

sensor_exposure = 2000
sensor_gain = 4


# -------------------------------------------------------------------------------------------------
# Setup SENSOR PARAMETERS
# -------------------------------------------------------------------------------------------------
sensor.reset()                                      #Reset and initialize the sensor.
sensor.set_pixformat(sensor.GRAYSCALE)              #Set pixel format to RGB565 (or GRAYSCALE)
sensor.set_framesize(sensor.QVGA)                   #Set frame size to QQVGA (160x120)
sensor.ioctl(sensor.IOCTL_SET_TRIGGERED_MODE, False)
sensor.skip_frames(time = 8000)                     # Wait for settings take effect.


# ------------------------------ -------------------------------------------------------------------
# Setup SENSOR EXPOSURE
# -------------------------------------------------------------------------------------------------
print("Initial exposure == %d" % sensor.get_exposure_us())
sensor.set_auto_exposure(False, exposure_us = sensor_exposure)
print("New exposure == %d" % sensor.get_exposure_us())

initial_gain_db = sensor.get_gain_db()
print("Initial gain_db == %d" % initial_gain_db)
sensor.set_auto_gain(False, sensor_gain)
print("New gain_db == %d" % sensor.get_gain_db())

My guess is there may be small variations between sensors at the manufacturing level, this is something beyond our control. Since the lighting is consistent you could try to calibrate the sensors, just capture an image and check against some known value and adjust the settings accordingly.

EDIT: It could also be the lens and its housing, leaking more/less light.

Thanks for the reply. We have a significant amount of these sensors so we will go forward and attempt to normalize with the levers that are available, as you suggested.