Problem with shapes created within a group end up being placed outside of that group

When I try to create a new shape within a group, Figma places it outside of the selected group. As a result, I have to manually drag it inside the group, and when I cut it to paste it into the group, it doesn’t maintain its original position. Does anyone know how to resolve this?