Offboard, Visual Positioning, EKF2, Control-2

Hello Community,
During the experiment, we have some doubts about airborne control, visual positioning, EKF2, etc., and hope you can give us some help.
Based on Offboard, Visual Positioning, EKF2, Control
In the second stage, we tried to use a range sensor as the altitude position source, and still used GPS as the horizontal positioning source. As in the first stage, we used the remote controller and onboard computer to control the UAV. During the test, the UAV flew smoothly, and the oscillation of local position Z disappeared. The position of the range sensor and the center of mass do not coincide. Before flight, the parameters we set include: EKF2_RNG_CTRL(Enabled), EKF2_RNG_A_MAX(6.00m), EKF2_RNG_POS_X(0.01m), EKF2_POS_Y(-0.08m), EKF2_HGT_REF(Range sensor), EKF2_GPS_CTRL(13). Below are the log files recorded in this stage:

Control the UAV using RC:

Use the onboard computer to control UAV flight with a circular path:

In the second stage, some questions are confusing us:

Q7. In POSITION mode, after the UAV took off and hovered, we controlled it to fly forward, backward, left, and right at a fixed height. We found that once the attitude of the UAV changed, the altitude decreased. By looking at the local position Z change curve in ULG, we found Z setpoint rises in a step-by-step manner, and the pilot didn’t move the Z stick during flight. But this situation didn’t occur in offboard mode. We speculated that this problem was caused by inaccurate parameter settings of the range sensor position relative to the center of mass, and the change of the UAV’s attitude would cause the range sensor to tilt, but we were not sure about that.

Q8. When using a range sensor, what other key parameters need to be set (Maybe like EKF2_RNG_A_IGATE)? How can we set a reasonable value?

Additional messages:
1.The version of PX4 firmware is 1.15.4, the version of mavros is 1.20.0, and the autopilot board is Holybro Pixhawk 4.
2. The onboard computer is Jetson Orin NX, and the operating system is Ubuntu 20.04.
3. The camera we used is T265, and the visual positioning algorithm is the camera’s built-in VIO algorithm.
4. The whole experiment is outdoors.