Depending on the setting of UIRoot and any anchoring you've used, the local position of a widget may not match screen coordinates.
For example, fixed size UIRoot means the local positions will be using virtual pixels, not actual pixels... so you setting the value using Screen.width and height won't give expected results. You need to actually transform from screen space to world space, then inverse transform to local space.
Again, UIFollowTarget script has the math for all this.