Drones move upward indirectly in altitude mode

Firstly , when I used CUAV V5 and ardupilot firmware without GPS, altitude was reasonable.

Then , I flashed PX4 Pro v1.10.1 stable version ,and I tuned same PID as before.

But when I switched altitude mode (from stablized mode) , the drone moved upward indirectly.

If you’ve been in the same situation, please leave me a message.The logs are as follows: