Hey Kees,
few things to clarify:
1. Are you rotating shape through its shapes's transformation properties, or from general layer rotation?
2. I assume shape layer is not center aligned in the comp?
It is not clear around which anchorpoint shape rotates, and it can be only guessed. If only 'Transform: Rectangle 1' transformation would be used, anchor point would stick.
Thanks!
Find out more:
After Effects Tutorials: motion design, expressions, scripting.