Viewport icon simply cannot accurately represent sun's apparent location in the sky. It's easy to see this, if you select sun object, change coordinate system to local and move sun back and forth in Z direction. Notice how sun apparently changes its location in the viewport, but it will always stays in the same position when rendering, because azimuth and zenith angles aren't changed.