Just for completeness, it seems you are modifying your data in-place.
If you can just index your joints and augment them using an assignment, this issue should not occur.
Have a look at the following code snippet:
class MyDataset(Dataset):
    def __init__(self):
        self.data = torch.ones(10, 10)
        
    def __getitem__(self, index):
        x = self.data[index]
        #x -= 1
        x = x - 1
        return x
    
    def __len__(self):
        return len(self.data)
    
dataset = MyDataset()
dataset[0]
print(dataset.data)

If you just run it, the original data will stay the same.
Swap the lines in __getitem__ and your dataset.data will be modified.