You generally don't want to scale the layer that contains the stroke, you want add keyframes to the mask path and animate the size of the path. This is easy. You just start by double-clicking one of the vertices and using the transform box.
If this technique does not work for you then you have two other options, both involving expressions. Both of these options use exactly the same expression to look at the scale of your null layer and both assume that the null is at 100% scale at the start of the animation. The option that I would choose would be to replace the mask path on a layer with stroke applied with shape layer path with stroke applied. You have so many more options and you're dealing with vector information. With either solution this is the expression.
sf = thisComp.layer("Control Null 1").transform.scale/100;
ov = value;
nv = ov / sf
sf (scale factor) is the x scale value of the controlling null that is the parent of the stroke layer or the layer with the stroke effect applied to a mask divided by 100. If you intend to scale X and Y of the parent you'll have to modify the expression and then combine the scale factors and this solution will not work as well. The original scale value is divided by 100 to turn it into a decimal value
ov (original value) is the original set value of the stroke.
nv (new value) is calculated by dividing the original value by the scale factor.
This is just basic algebra from the 7th grade. If your controlling parent is scaled below 0 then the stroke will go away because the value will change to a negative number. If this is necessary in your composition you can write an if statement that will change the nv back to a positive number if the scale factor becomes less than or equal to zero and solves the divide by zero error you would get with a scale factor of zero.
One last point, and this is important. This expression will produce accurate results if applied to the brush size of a mask path when using the Effects>Generate>Stroke effect to create your line but when scaled over 100% the line will begin to fall apart and anti aliasing will not be able to keep up with pixilation caused by the scale. Over about 120% the line will start to look thinner and over 140% it will look bad even though the stroke width is numerically accurate.
I'll let you take it from here.
Without understanding exactly the structure, nobody can tell you anything. Provide scereenshots of the timeline with the relevant properties visible.
Thanks Rick, I got it to work as suggested.
Glad to help. Please mark the question as answered so others can find the solution to similar problems.