nn.BCEWithLogitsLoss is used for a binary or multi-label classification (each sample can belong to zero, one or more classes), not for a multi-class classification (each sample belongs to one class only).
You could use both criteria for a binary classification, though.
With nn.BCEWithLogitsLoss it would be a vanilla binary classification, while nn.CrossentropyLoss would treat the use case as a 2-class multi-class classification.