Involuntary flight control movements

I have been running MSFS 2020 for some time and now have a problem with the flaps and rudder. When flaps down is selected the flaps duly lower but after a second or two they retract again. This happens when the flaps are actuated by either the joystick or the keyboard. The same with the rudder left and right, after a few seconds the rudder returns to the neutral position. The elevator and ailerons respond normally.

I tried disconnecting the joystick and also switching off the mouse but the same thing happens when the keyboard is used for control.

It happens to aircraft from either the community or the official folder.

I don’t want the hassle of re-installing if I can help it, can anyone suggest what the cause could be?

Do you have AI copilot assist settings turned on? If so, that’s the copilot telling you “We don’t need flaps now”

Thanks for help, you are absolutely right and my problem is now solved.