The DataLoader itself will not mutate the Dataset, as it’s calling into the Dataset to get the data, create batches, shuffle etc.
However, the Dataset.__getitem__ could mutate the data in case you are manipulating it inplace (this is usually not wanted and caused errors in the past).
There is also a difference between the behavior of a single worker (main thread) or multiple workers, as the latter will create copies in each worker. So even if you are manipulating the data in the __getitem__ method inplace, these manipulations won’t be stored in the original Dataset.
TL;DR: check the Dataset.__getitem__ and make sure the data is not manipulated inplace.