nn.BCEWithLogitsLoss was just the better alternative to nn.BCEWithLogitsLoss.
For a depth estimation I would guess that nn.L1Loss or nn.MSELoss might work better, but you should try out different approaches.