Screensharing locks client session and won't reconnect
I have a work laptop in the closet, always plugged in. I can screenshare/VNC into it just fine. Whether I'm actively typing or not, it occasionally interrupts the session and simply will not resume. Disco/reconnect doesn't help. The only fix I've found is to ssh into the work laptop and stop/start the service using the command below. Has anyone found a permanent fix for this?
sudo /bin/launchctl unload -w /System/Library/LaunchDaemons/com.apple.screensharing.plist
sudo /bin/launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist
MacBook Pro 16″, macOS 15.4