Position mode with range and optical flow

Hello all,
I am building an indoor drone with using rangefinder and optical flow without gps. I can see sensor otuputs of optical flow and rangefinder. Also I set the EKF2_HGT_MODE RANGE to range.

px board: pixhawk 4
rangefinder: tf luna
optical flow: thonefow

when drone starts in manual mode and after increase height (if status bigger than 1-1.5 m) I can change the mode to position or altitude. But when drone starts with position or altitude mode when I give setpoint, the motors are getting too much thrust suddenly and I’m losing control. also I am facing this issue when I change mode to position or altitude when drone is not enough height.

How to fix it this issue this issue?

You can try setting up the motor thrust hover value, it might solve your problem