For some players, USB (controller/gamepad, joystick, pedals, headphone, keyboard, mouse) keeps disconnecting randomly while flight in Microsoft Flight Simulator 2020.
If your USB devices are disconnected and then the game crashes with the error "FlightSimulator.exe has stopped working. A problem caused the program to stop working correctly. Please close the program.", it could be a hardware, power or driver issue.

I've listed below troubleshooting tips to help you fix this problem.

Fixes for USB disconnecting randomly while playing Microsoft Flight Simulator
Disable the power saving option
It is possible to fix USB keeps disconnecting and reconnecting issue by turning off the power saving option.
- Right-click on the Windows logo/Start menu
- Select Device Manager
- Double-click on the "Universal Serial Bus controllers"
- Right-click on any USB Hub
- Select Properties

- Go to Power Management tab.
- Uncheck "Allow the computer to turn off this device to save power"
- Click OK button.

- Repeat this change for all USB Hubs (Generic USB Hub, USB Root Hub, SuperSpeed USB Hub, USB 3.0) in your Device Manager.
Change the power plan
There may be a power issue on your PC. You can try changing the power plan to fix the problem.

- Go to Windows settings > System > Power & sleep
- Click on the "Additional power settings" under the "Related settings" section.
- In the Power Options window that opens, choose a different power plan.
- Then check if the problem is fixed.
Update your drivers
I suggest you update your Intel Chipset driver. You should also update the BIOS.
And also, you can update the drivers of USB Hubs in the device manager.
- Go to your Device Manager
- Double-click "Universal Serial Bus controllers"
- Right click on USB Hub, and select Update driver.
- Then select "Search automatically for drivers". Repeat this for all USB Hubs.
If you still facing the same issue, it could be a hardware related issue. Try your USB device on a different PC. Or try plugging your USB device into a different port.
By the way, there might be those who have this problem in any PC game. These fixes apply to all games.
The process of unchecking the "Power Management > Allow the computer to turn off this device to save power" option corrected the problem for me, but I found that some of the devices with this option automatically revert back to checked after a reboot. I had to identify which ones did this, and make sure to uncheck them again before running MSFS 2020. So far this seems to have resolved the problem.