How to switch camera over shoulder but still the camera aim at center?

To me it seems that you’re using a variable trace distance and base some other calculations off that result. Rather than drawing the cursor where the trace terminates, you deproject the hit location and place the crosshair there. That would explain that uncanny shift.

I might be completely wrong. Could you elaborate on that? Can we see your tracing method?