Could you post a code snippet to reproduce this issue, since the data and target samples should be shuffled in the same way. Otherwise their correspondence would be broken.
This dummy example works fine:
x = torch.arange(100)
y = torch.arange(100)

dataset = torch.utils.data.TensorDataset(x, y)
loader = torch.utils.data.DataLoader(
    dataset,
    shuffle=True,
    batch_size=2
)

for data, target in loader:
    print((data==target).all())