ADD1: This elementary transparency thing isn't the cause, see ADD2.
Dropping linearly = increase transparency linearly. You expect that at some point, say at 50% point of the slope the brightness should be full 100 % if there's in the same place also a 50% point of the lower light layer.
But it isn't. If the lower layer is also 50% transparent there can be seen some black through. The total brightness is only 75%.
See this image which has black in the bottom and 2 full white layers:
The top layer was made by duplicating Layer 2. The layer masks of the top layer was inverted after it. In the middle there's a darker zone because brightness isn't 100%, no matter the sum of white layer opacities is everywhere 100%.
Blending modes are = normal. Changing them to Add cause nothing as you can calculate if you want.
Your lights should be opaque gradients from bright color to black. Then they would work with blending mode Add as you expect. See this example:
The top and mid layers have both blending mode= Add. Both layers are opaque. The top layer = the mid layer inverted.
ADDADD2: Your edited demo starts to work properly in Photoshop if you change to 32 bit/channel color mode. See the next screenshot:
GIMP with default settings works also like expected, no dark zone problem occurs.
A little resembling case with Photoshop gave an idea that "gamma" has some role also in this case. Experiments with Krita brought the light. I found that theThe problem really is caused by the gamma property of the used RGB color space. Color mixing with the usual non-linear gamma generates darker results than one expects. Linear gamma (=1.0) hasn't that problem.
In Krita you have plenty of options to select from. You can select a version of sRGB with linear gamma. Krita recommends to use also 16bit color depth for acceptably dense set of available colors; 8bit integer/channel with linear gamma can cause banding in well visible colors.
In the next image a copy is made of your layer 2 and it's placed on the top of the layer 1, blending is Addition. The image is converted to linear gamma RGB color space with 16 bit/channel depth. The problem vanished.
In your program you should calculate the color mixing in linear gamma colorspace. I am not a competent mathematician, so I cannot give any ready to use equations. Sorry. I guess you should convert the compensated RGB numbers before the weighted addition with high enough calculation accuracy to avoid generating artifacts.