It is not recommended. This is what explained to me. The explanation has a few more paragraphs, here is one of the paragraphs.
“if the ek3-srcx-posz = 2 (rangefinder) and the vehicle is not flying over flat ground the EKF’s altitude estimate will be bad. Every time the vehicle flies over something, the EKF will struggle for a bit to figure out what the correct altitude should be as it tries to make sense of the rangefinder data not matching the IMU.”
“Making both the position controller and EKF try to handle the position error leads to conflict.”
[Edit]
I have not done extensive tests, but I have tried the following configuration with a covered FCU (reduced vibrations and barometer drastically changes) and achieved good height control. Not sure about your requirements.
EK3_RNG_I_GATE,500
EK3_RNG_M_NSE,0.5
EK3_RNG_USE_HGT,63 # LW20/C
EK3_RNG_USE_SPD,6
SURFTRAK_MODE,0