How to maintain altitude of quadcopter while using /mavros/setpoint_raw/global?

Hello. everyone.
I am doing research about quadcopter position control based on GPS coordinates.

I am using pixhawk4 mini for flight control.
I have a landing target in a distance from the quadcopter and it subscribes the target’s GPS coordinates(latitude, longitude).

I used “/mavros/setpoint_raw/global”, GlobalPositionTarget,

    self.sp_glob = GlobalPositionTarget()
    # self.sp_glob.header.stamp = rospy.get_time()
    self.sp_glob.header.frame_id = 'map'
    self.sp_glob.type_mask = int('111111111000', 2)
    self.sp_glob.coordinate_frame = 6  
    self.sp_glob.latitude = 0
    self.sp_glob.longitude = 0
    self.sp_glob.altitude = 0

I used latitude, longitude from Raspberry Pi (ex 37.xxxxx, 132.xxxx)
and altitude value of 5 or 10m.

But when I published message through python code, The Drone moved to the right latitude and longitude, But just crushed to the ground.

How can I solve this problem?

Should I have to change the value of altitude? (The drone skyrocketed when I used the value of 150, and the MSL of home position was 150~160m)

Or should I have to consider the frame of GlobalPositionTarget() message type?

Here is the log file

And the full codes.
Quadcopter skyrockets when I publish "mavros/setpoint_raw/global"

If you look at your log, you exited offboard mode quite early before it gained any altitude. Did the aircraft already gain too much altitude, but the estimator failed to capture this? or why did it enter land mode?

It is saying it went in to land mode because the battery was too low. Therefore, I think the behavior has nothing to do with offboard mode