By default, if you drag an item on a frame, the item will become a child of the frame. Disable this by holding CMD and then release the mouse.
Note if you release CMD before releasing the mouse, auto-reparenting still happens.
PS: If you find this tip difficult to understand, check out this course I prepared for you, where concepts are explained in a more digestible way. No programming experience required!