Yes, maybe that something I mentioned just has no parent of type Node2D.
Interestingly, the method's declaration is:
Tranform2D get-relative-transform-to-parent(Node parent) const
but internally it checks if parent is a Node2D and produces the error if not. I don't quite understand why it produces the error and not just stop hiking up the tree when there's no node with a Transform2D.