Thank you for the reply.
If the algorithm does not clip the boxes, then is there any other part of the code where they are inadvertently being clipped? I have a custom dataset, with the following __getitem__() function:
def __getitem__(self, idx):
    img_path = os.path.join(self.root, self.imgs[idx])
    img = read_image(img_path)
    img = img / 255.
    bb = self.boxes[idx][0]
    bboxes = []
    for i in range(bb.shape[0]):
        xmin = max(bb[i,0]-1, 0) # convert from MATLAB format to Python format
        ymin = max(bb[i,1]-1, 0) # and correct invalid bounding boxes
        w = bb[i,2]
        h = bb[i,3]
        image_width, image_height = F.get_image_size(img)
        xmax = min(xmin+w, image_width-1)
        ymax = min(ymin+h, image_height-1)
        bboxes.append([xmin, ymin, xmax, ymax])
    bboxes = torch.as_tensor(bboxes, dtype=torch.float32)
    labels = torch.ones((bb.shape[0],), dtype=torch.int64)
    
    target = {}
    target["boxes"] = bboxes
    target["labels"] = labels
    target["image_id"] = torch.tensor([idx])
    
    if self.data_transforms is not None:
        img, target = self.data_transforms(img, target)

    return img, target

and the following transform for resizing the images and boxes:
class Resize(T.Resize):
    def forward(self,
                image: Tensor,
                target: Dict[str, Tensor]
                ) -> Tuple[Tensor, Dict[str, Tensor]]:
        width, height = F.get_image_size(image)
        image = F.resize(image, self.size, self.interpolation, self.max_size, self.antialias)
        factor_w = width / self.size[0]
        factor_h = height / self.size[1]
        target["boxes"][:, [0, 2]] = torch.div(target["boxes"][:, [0, 2]], factor_w, rounding_mode='floor')
        target["boxes"][:, [1, 3]] = torch.div(target["boxes"][:, [1, 3]], factor_h, rounding_mode='floor')
        return image, target

I am also happy to share any other details that might help identify the problem.
Thank you again for your help.