Drone with Pixhawk flies away at the end of automatic flight mission

I use Pixhawk controller and QGroundControl application.
I use virtual control panel and automatic flight with predefined mission.
At the end of automatic flight in many cases but not always the drone flies away before RTL landing at the end of mission. The obly case to return it at such failure is to disconnect radiomodem from laptop. When connection between user and drone losses the drone begins landing at start point. The failsafe mode RTL when connection broken is activated.
So I don’t know the reason why drone does not returns home normally sometimes.