Probably, need to apply shadow fade (based on world-space position) to shadow attenuation:
Light light = GetMainLight(shadow_coord);
light.shadowAttenuation = lerp(light.shadowAttenuation, 1, GetShadowFade(i.position_ws));
Note: 1 is for the absence of baked shadow