I like to get my sensor as close the the hub as possible. Closer to the rim and the magnet gets usually gets knocked around a little.
As Mateo said, no change in accuracy. The sensor is only counting wheel revolutions.
For best accuracy, when you measure your wheel roll-out, be use the tire is filled to your appropriate riding pressure, and that you simulate normal riding weight on that tire. Those two items have the biggest impact on accuracy of the mileage recorded.