You are recreating the tensor here without any gradient history:
currCriticVals = torch.tensor(currCriticVals[0:advantages.shape[0]], dtype=torch.float, requires_grad=True, device=device)

currCriticVals is a new tensor, which requires gradients without any history and will thus detach the computation graph.
This fits into the “rewrapping tensors” point. Assuming currCriticVals is a tensor attached to the computation graph and you want to create a new tensor with its slices, try to use torch.cat or torch.stack instead.