I'm no engineer, and I may be misunderstanding this discussion ad the pictures, but I do not think a set screw tightened on a flat milled into a shaft like that can accurately be said to be "in shear."
If those parts are made correctly, and the D-shaped shaft is mated to a D-shaped socket, then that that screw is doing what it is doing more or less "in compression." I think this would be accurate to say even with a round socket. You'd be in shear if you cross-drilled it.
And I think that matters. The screw in shear could be weak and dangerous. In compression, probably not.