Different behaviour of the same pymavlink script running on windows and linux

Hi everyone! Maybe someone have already dealed with different behaviour of the same script running on windows and linux based PC? I`m trying to change a flight mode using pymavlink python script - when I run it on windows based PC, after if I check mission planner I can see what script is working, mode was changed, when I use linux based PC - Mission planner doesnt display that the mode was changed. My PC that I want to use with Drone is Jetson Nano, so I need script to be work on Linux based PC.
Thanks in advance

script.txt (2.2 KB)

the_connection = mavutil.mavlink_connection(‘COM11’, baud=57600)

There is no COM11 on Linux, adjust your serial port!