I cannot reproduce the issue and both approaches work as expected:
criterion = nn.MSELoss()

x = torch.randn(10, 10)
y = torch.randn(10, 10).double()

loss = criterion(x, y)

class MSLELoss(nn.Module):
    def __init__(self):
        super().__init__()
        self.mse = nn.MSELoss()
        
    def forward(self, pred, actual):
        return self.mse(pred,actual)
      
my_criterion = MSLELoss()
loss = my_criterion(x, y)