How to connect absolute encoder on the rotating shaft. Please see the three options?
The most important thing for angular accuracy is that the encoder is in rigid contact with the load you are driving.

From your drawings, it appears that the load is a leadscrew shaft.

Either option that puts the encoder on the shaft will be OK, for accuracy.

There will be other mechanical constraints. The difference between your options 1 and 2 is that the encoder can physically support the end of the shaft. This may be good or bad, depending on how the encoder is rated, whether side-loads will decrease its accuracy, whether you want the shaft supported at both ends or free at the far end, and your assembly tolerances. You will need the spec of your components, and the spec of what you are trying to achieve, to know which.