No, you can apply any interpolation on the image (as long as your training pipeline works fine, as some interpolation methods might work better than others). The main concern is to keep your mask with class indices.
PIL uses numpy arrays internally, if I’m not mistaken, so your workflow should work fine.
Once you have created your Dataset just make sure that your mask and image tensors are still valid. I would simply read some random samples and e.g. visualize the mask.