Recreating a tensor will break the computation graph.
If you would like to concatenate two tensors, you should use torch.cat or torch.stack instead:
x = torch.rand(1, requires_grad=True)
y = torch.cat([x , torch.tensor([0.])])
print(y.grad_fn)
<CatBackward object at 0x7fdb08dca6d8>