Why is transform.SetParent not working with Transform objects?

Why is transform.SetParent not working with Transform objects?

If I do this, it will not be set as the child:

[SerializeField] Transform _parent;

clone = Instantiate(...);
clone.transform.SetParent(_parent);

It only works this way:

[SerializeField] GameObject_parent;

clone = Instantiate(...);
clone.transform.SetParent(_parent.transform);

Edit:
Damn, one thing I forgot to mention is that the transform I am linking in the editor is a RectTransfrom, as I’m instantiating a UI object and setting another UI element as its parent.

Edit 2:
And yes, it does not work with RectTransform either.

Found an answer!

So you can set the parent like this:

You need to call this every time you want to set the parent:

StartCoroutine (SetParent ());

Then add this:

IEnumerator SetParent () {
	someObject.rectTransform.SetParent (transform.parent);
	yield return 0;
	someObject.rectTransform.SetAsLastSibling ();
}

Then your done!!