I forget if we talked about this before or not but it looks like the EK2_ALT_SOURCE = 1 (range finder). It’s mentioned in numerous places but in short, it should be set to “0” in 99% of cases.
No, it uses lidar in AltHold and PosHold but the EKF doesn’t need to use the range finder to estimate it’s altitude. “Terrain Following” is explained here and here.