FlySky 6 channel transmitter has a problem that can cause this. Are you using FlySky?
https://www.rcgroups.com/forums/showthread.php?2145070-New-Flysky-FS-i6/page117#post38300831May be a (very) bad solder joint or badly crimped connector.
It could be electrical noise caused by BEC built into ESC.
You should not be using TPA/TPS (Stabilization->Advanced I think?) with an airplane.
Are you using the stock prop? What size is the prop? What KV is the motor (1500 IIRC)? Is the battery new? What size is the battery?
What receiver signal protocol are you using? PPM, PWM, SBus, DSM, etc.?
PPM incompatibilities can cause the set of channels to jump by one or more so that e.g. transmitter channel 2 controls receiver channel 1 or 3 instead of 2.
Try to narrow down what is causing it.
You can run the motor up with the transmitter, but with USB and GCS also connected and watch Input page (there is a 1 second lag) to see if signals from the receiver are jumping. You can also watch the Output page.
You can take the prop off and see if the problem goes away (vibration or electrical load).
You could (all of these):
- disconnect motor signal connector (ESC control signal connector) from the FC (this also disconnects FC power)
- connect a different 5V power source to the FC motor signal connector to power the FC
- connect a different signal source (servo tester/controller, or a 2nd RC radio transmitter/receiver) to control the motor
https://www.ebay.com/itm/Multi-RC-Digital-ESC-Servo-Tester-3CH-ECS-Consistency-Speed-Controler-PowerBLBD/183574395536- Understand that the whole battery/ESC/motor is now separated from the RC radio and FC, so it is now basically impossible for the battery/ESC/motor to electrically affect the RC radio or FC.
- see if problem still happens when you use the new way of controlling the motor to run the motor up and down
- if it happens with new motor control it must be vibration (possibly affecting a bad connection).
- see if problem still happens when you use the old way of controlling the motor (which now doesn't do anything)
- if it happens with old motor control (which isn't controlling anything any more), it is a radio problem
- if neither make it happen, it is likely a problem with the ESC/BEC/5V-power (bad power of some sort)
A video might help.