We use SEW Eurodrive motors/encoders. The shield is connected on both ends, but the encoder is mounted electrically isolated from the rest of the motor.
The advantage is that the encoder housing is securely shielded via the cable/connector and that the encoder and cable are within one shield.
We never have any EMC problems with the encoders, even when we use them close to spotwelding and migwelding applications.