Hm, I haven’t upgraded to Nougat yet, so I can’t verify this. I have experienced a similar behaviour with Samsung SideSync, though: whenever I switch from remote control via PC back to direct control on my phone, I’m dropped back into mDosbox main menu. I thought this was related to the SideSync app switching my phone’s screen on/off, and doing some weird stuff in the background.
I’ll try my own bluetooth keyboard and gamepad.
*EDIT: at least my gamepad is working fine. I can disconnect and reconnect it without any issues. I don’t have my BT keyboard with me, so it’ll take some time before I can check.