Do you have the same issue if you follow the OP’s steps to reproduce it?
same thing happens to me. Xbox series x.
Provide extra information to complete the original description of the issue:
I finally figured out if I don’t connect the keyboard to the Xbox until after MSFS 2020 has completely started up (at the main menu). Then plug it in, I have better luck with it keeping the keyboard connected an entire flight. Even after that, at random times it (sometimes it’s fine) it’ll just disconnects the keyboard. I then have to unplug the keyboard then plug it back in , and all is fine. But if I have it plugged in from the get go, it’ll disconnect after I look at a few screens, like the map, or the store pretty much every time I start MSFS. Not always (and not each time I switch menus), but more often than not. This all started for me SU10 if I remember correctly. It’s def not as bad as getting a CTD, I’ve learned to plug and unplug that usb cord without even looking now.
If relevant, provide additional screenshots/video: