First, navigate to Options \ Session Options on the menu:

Now click on the Terminal tree item, and select the “Send Protocol NO-OP” checkbox.

This will send a message to the SSH server that your session is still alive, and shouldn’t be disconnected.