VTOL will crash in return mode after velocity control via offboard mode

Hi, we are testing the VTOL drone using PX4 1.14.3+MAVROS 1.19.0, but we found that after offboard velocity control in fixed wing mode, the drone crashed when switched to return mode.

Based on the logs, we found that the fixed-wing motor’s RPM was constant in return mode, which could lead to the drone not having enough lift and thus crashing. As a comparison, drone wont crash in return mode after position control, which makes us wonder.

We tested this in version 1.13.2, 1.14.0, and 1.14.3, where 1.14 had this issue, but 1.13 was fine. I think some logic error may happened in the 1.14 update, but due to specific sensor requirements, we can only use the version above 1.14. I sincerely want to know how to deal with this issue.

This is our actual flight log and runnable primary code.
Velocity control and return(The oscillation of the TECS controller does not seem to be relevant to this question): https://logs.px4.io/plot_app?log=f2a737ec-4436-4806-92e6-f8fc320d4b4c

Position control and return: https://logs.px4.io/plot_app?log=473e2a04-2c2e-42df-9c6c-3dd0ca746df1

primary code: Ubuntu Pastebin

Thank you!

@Jaeyoung-Lim This is a very challenging question for me, and I would very much like to hear your thoughts on it if you have the time.