I’d look closely at your bindings. You might want to check all your input devices for conflicts. I once had the same issue and after looking at everything, I realized I had set a switch on my throttle to control the flaps. I later decided to use a button on my joystick, and later had the same problem. I had apparently hit the throttle switch and moved it into the “flaps up” position, and it was sending out a constant signal so that no matter how I tried to lower the flaps they would just go back up as soon as I released the button on the joystick.
Hope you resolve the issue.
Regards