Neither telnet nor ssh handle problems like your laptop going to sleep or changing networks. These are stale and it in due time that we move to something better.
I haven't used it, but mosh supposedly handles suspended sessions.
Alternately, you can do the same with tmux or screen.
Mosh into a tmux session is dreamy. I can connect from my iPad to a remote server at home, carry it onto a bus and continue working, then carry to a coffee shop and finish what I was doing, all without ever having to reconnect.
I’ve had some success with eternal-terminal too, where mosh didn’t support true colour.