If the losses are independent and don’t share any parameters, which were used to compute them, you should get the same results.
Are you able to reproduce this issue deterministically by seeding the code?
If so, could you share a code snippet so that we could have a look?
Here is a small example, which yields exact the same gradients:
# separate losses
torch.manual_seed(2809)

model1 = models.resnet18()
model2 = models.resnet34()

x = torch.randn(2, 3, 224, 224)
target = torch.tensor([0, 999])
criterion = nn.CrossEntropyLoss()

output1 = model1(x)
output2 = model2(x)
loss1 = criterion(output1, target)
loss2 = criterion(output2, target)

loss1.backward()
loss2.backward()
grad1_ref = {name: p.grad.clone() for name, p in model1.named_parameters()}
grad2_ref = {name: p.grad.clone() for name, p in model2.named_parameters()}

model1.zero_grad()
model2.zero_grad()

# loss sum
torch.manual_seed(2809)

model1 = models.resnet18()
model2 = models.resnet34()

x = torch.randn(2, 3, 224, 224)
target = torch.tensor([0, 999])
criterion = nn.CrossEntropyLoss()

output1 = model1(x)
output2 = model2(x)
loss1 = criterion(output1, target)
loss2 = criterion(output2, target)

loss = loss1 + loss2
loss = loss.backward()
grad1 = {name: p.grad.clone() for name, p in model1.named_parameters()}
grad2 = {name: p.grad.clone() for name, p in model2.named_parameters()}

# compare
for name in grad1_ref:
    print('model1 grad diff for {}: {}'.format(
        name, (grad1_ref[name] - grad1[name]).abs().max()))
    print('model2 grad diff for {}: {}'.format(
        name, (grad2_ref[name] - grad2[name]).abs().max()))