How are you changing the stage size?
And are the dimensions of stage as well as the elements on it are specified in % rather than px?
The stage was in pixels but the shapes were both in percentages. I changed both to pixels and it works perfectly. Thank you for your help!