I have the same issue. When you (manually) lock the aspect ratio (the lock icon next to w and h) the resizing happens as expected.
There seems to be no way to set the aspect ration from code which is a shame because dynamic Layout is half useless here.
You can vote for it here:
1 Like