Distance sensor as only source of altitude

Can you share abit more information on your setup? What is your rangefinder and how it’s install? What is the wingspan of your aircraft? What is your cruise speed? What type of terrain you are flying over?

For the fusion of the range finder make sure all the EKF2_RNG_* params are correctly set
for your setup and your use case.

For the fusion of the baro data their is two param directly related to the ground effect:

EKF2_GND_MAX_HGT
EKF2_GND_EFF_DZ

after that you can tune these param to modify how much or how little the EKF use the baro data:

EKF2_BARO_NOISE
EKF2_BARO_GATE