Yes, every IB user experiences the same issue since this is "a feature" offered in TWS. Many people request to remove "this feature" off but all failed.
It can't be turned off in any way as far as I know, but you can change the logoff time to bypass it. For example, if you set to logoff at midnight. It will pop up a warning before about 5 mins. You simply change the time to 11:55pm to bypass the logoff.
If you don't want to do it manually, you need to write a script so it will answer the dialog and change the time for you automatically. Some automation software or scripting language is the way to go.