Result from the first command using your input image (rounded to 0,255 for jpg). The second command gives me an error: something wrong with the parameters?
From CLI. Still not satisfactory in my opinion, but remember this is shading on a 2d surface! A guided filter application on the circle-sphere might help. The edge is hard and artifact prone: is cut off in an aliased way. Could boundary conditions be applied on a curve or non-rectangle?
Absolute difference (normalized) from your output
PS I removed solved from the topic. It isn’t solved in my opinion and worth exploring further.