It’s transposed because:

the  DataLoader  loads the data in a systematic way such that we stack data vertically instead of horizontally.This is particularly useful for flowing batches of tensors as tensors stack vertically (i.e. in the first dimension) to form batches.
(https://towardsdatascience.com/building-efficient-custom-datasets-in-pytorch-2563b946fd9f 12)

And this is caused by the default_collate function. You can use the default_convert function as collate_fn to keep the axis:
from torch.utils.data._utils.collate import default_convert
from torch.utils.data import DataLoader

data = DataLoader(<dataset>, collate_fn=default_convert)