It could be possible to use them, but it depends on the actual use case.
I.e. in case the model outputs a tensor with a different sequence length than the target tensor, how would the loss be calculated? If your criterion handles inputs of different lengths, then it would work.