Check your hardware bindings. Flaps moving after ESC suggest there’s another buttons or axis being bound to the command that you don’t use.
What hardware do you use? When I had that issue, I was using the base Thrustmaster TCA Quadrant without the Addon. But the default binding for that hardware is set to have the spoilers and flaps binding with the spoilers and flaps addon attached. So if you don’t have it attached, the sim is getting phantom inputs from a nonexistant hardware, moving the spoilers and flaps around.
So I look at the control bindings and remove the spoilers and flaps from being bound to those axis, and that solved my problem. Until I got myself the addons and I attach them, then I rebind them again.
So check with all your controls, if you find the spoilers or flaps axis being bound to a axis or button that you don’t use, remove them.