I am having an issue keeping ssh connections alive on macOS Monterey when using battery. whenever the screen shuts down or I manually lock the screen all connections stop and upon resuming my ssh session is frozen and I have to reconnect again.
I have tried all options in battery settings but to no success, it keeps shutting down any connection have instantly
I am running an m1 pro 16" macbook, if that's useful info