Unfortunately, I don’t understand how your output tensor is created given the inp and masks (e.g. where is the 11. coming from in output[0, 0, 0, 2]).
In any case, using your manual loop approach and the “summed” mask approach would still yield the same result, as you are just applying the masks sequentially and could thus also just create a single mask:
# setup
inp = torch.tensor([[[[11., 11., 10., 12.],
                      [10., 11., 11., 10.],
                      [11., 12., 12., 12.],
                      [10., 12., 11., 10.]]]], requires_grad=True)

masks = torch.tensor([[[[[ True,  True,  True, False],
                         [False, False, False, False],
                         [False, False, False, False],
                         [False, False, False, False]]]],

                      [[[[False, False, False,  True],
                         [False, False, False, False],
                         [False, False, False, False],
                         [False, False, False, False]]]],

                      [[[[False, False, False, False],
                         [ True,  True,  True,  True],
                         [ True,  True,  True,  True],
                         [ True,  True,  True,  True]]]]])

# reference
reference_output = torch.tensor([[[[11., 11., 11., 12.],
                                   [12., 12., 12., 12.],
                                   [12., 12., 12., 12.],
                                   [12., 12., 12., 12.]]]])

# loop
loop_output = torch.zeros(inp.shape)
for m in torch.unbind(masks, dim=0):
 	loop_output[m] = inp[m]

print((loop_output == reference_output).all())
> tensor(False)

# summed
mask = masks.sum(dim=0).bool()
summed_output = torch.zeros(inp.shape)
summed_output[mask] = inp[mask]
print((summed_output==reference_output).all())
> tensor(False)
print((summed_output==loop_output).all())
> tensor(True)