Why does the offboard control take off behavior is different from the Frsky control

Why the offboard control sometimes “take off” acts differently from the position control by FrSky?
Thank you very much for your help.

This log is to use position flight mode by FrSky RC radio controller.
It takes off stably. There is the video.
image

On the other hand,
If using position flight mode by offboard control . There is the log.
It sometimes takes off tilt. There is the video.
image

The offboard control code is according to the official website.
There is my modification.

It may not be a good solution.
The temporary solution is to increase the PWM_MAIN_MIN parameter from 1250 to 1300 us