One thing you need to remember is that when the rectangle is rotated, the circle isn't linked to it in any way so if you want the circle's movement to mimic the rotation of the rectangle, the direction needs to be taken into account.
That said, if the position is incorrect, something is else is wrong.
Since the rectangle is rotating around its origin and you want the circle to be positioned at that origin, simply set the circle's position to the exact same position of the rectangle ("position" is technically the position of the origin).