I have found the following post but I don't understand the answer, maybe because I am a noob at Figma.
- Select the parent object
- Go to the Inspector panel
- Under the Layout section, enable a Layout Grid
- Select the child object
- Set its width and height to be a percentage of the parent's width and height
Thus way the child object will keep a consistent size relative to its parent, regardless of any changes made to the parent's size.