Reassigning BT root and its children
Variable cur and root points to the same object at the start. Think of it as assigning an object two names - root and cur.
In test1 you changed the object pointed to by root. This means that the name root has been assigned to a different object. However, cur remains to be the name of the object at the start. So now root and cur do not point to the same object.
In your test2 you did not change the object pointed by root, but you modified the object shared by both cur and root, through root so changes to this shared object will be reflected in both.
Try to read this for more info https://realpython.com/python-variables/