I have the same problem trying to do screen sharing with JAMF Remote that I have always had with Apple Remote Desktop (ARD). About half the time I will get connection errors on attempts to connect to the client. See attached image.
If the box for Remote Management in the client's system preferences/sharing is unchecked and then rechecked, the client all of a sudden will start cooperating. That stops the process and then restarts it.
What I would like to do before attempting screen sharing is push a script to the client to kill the process and relaunch it. What is the process name and the script command to do that? Whatever the process name is, the process ID will vary each time so I can't specify a PID.
Why is it so difficult and why Apple does not have a solution to screen share between Macs. seems ridiculous... I can remote from a Mac to my windows machine with Microsoft Remote desktop flawless. What's really the issue remoting mac to mac ?