I haven’t tried this but you could precompose each layer with its mask. Then use the same expression on each of the resulting precomp layers.
The expression would get the width and height of each inner masked layer and then do some simple math to place the masked area at the center inside the precomp. The objects true anchor is still offset from the mask where it was, but because the masked area is now centered within the nested comp, the outer precomp layer would be centered, and have its anchor point in the center, and the object within would be centered to that. So the new anchor point is just the center of the outer comp.
The only downside is that once all the expressions are on each layer, all of your “objects” would be centered and stacked in the outer comp.
You could do this with one expression but it would be big and it might be easier to just copy and paste the same expression to all the layers.
The other way would be to use an expression to get the width and height of each layer’s masked area and apply a null to the calculated center of that masked area and use the null as your “anchor”. That way none of the layers move from where they were and you can drag or rotate you masked area with the new nulls.
There’s a bit of a snake chasing it’s tale in the last idea, so you might have to position the nulls with the expressions and then turn the expressions off (or delete them or convert expressions to key frames and then delete those) and link each layer to its newly positioned null using the parent picker.