CLEAR_ALL_MISSION mavlink message not working

I’m trying to clear all mission from STIL using CLEAR_ALL_MISSION mavlink command but its not working, I use this code

import time
import sys
from pymavlink import mavutil
master = mavutil.mavlink_connection(‘udpin:localhost:14551’)
master.wait_heartbeat()
master.mav.mission_clear_all_send(
master.target_system, master.target_component,0
)
while True:
time.sleep(0.01)
try:
message = master.recv_match(type = “MISSION_ACK” , blocking=True).to_dict()
print(message)
except Exception as error:
print(error)
sys.exit(0)

and I also getting a feedback of “MISSION_ACK: TYPE_MISSION: ACCEPTED”

but when I’m changing the mode to auto mode after clear all mission, the vehicle again starting performing previous mission.

please let me know, if i’m doing anything wrong…

I had a look at the Arducopter source code but didn’t go too deep. I would assume it is unsupported in mission type you are sending in the packet.

Only these mission types are supported:

MAV_MISSION_TYPE_MISSION:
MAV_MISSION_TYPE_RALLY:
MAV_MISSION_TYPE_FENCE: