That is an unusual use case, but apparently there might be some valid use cases, which require the targets to get gradients:
x = torch.randn(2, 4, requires_grad=True)
y = torch.randint(0, 2, (2, 4)).float().requires_grad_(True)

criterion = nn.BCEWithLogitsLoss()
loss = criterion(x, y)
loss.backward()

print(x.grad)
> tensor([[ 0.0799,  0.0592, -0.0284, -0.0983],
          [ 0.0537, -0.0384, -0.0770, -0.0801]])
print(y.grad)
> tensor([[-0.0715,  0.0134, -0.1531,  0.1629],
          [ 0.0353, -0.1015,  0.0592,  0.0722]])

However, I don’t know, when you would need to update the targets.