Why this TensorFlow Transformer model has Linear output instead of Softmax?
The key is precisely in the definition of the loss:
loss_object = tf.keras.losses.SparseCategoricalCrossentropy(
    from_logits=True, reduction='none')

As you can see, the loss is created with the flag from_logits=True which means that the input to the loss is not a probability distribution, but unnormalized log probabilities, namely &quot;logits&quot;, which is precisely the result of the final projection, before any softmax.
When from_logits is true, the softmax itself is handled inside the loss, combining it with the sparse categorical cross-entropy into a more numerically stable form.
From the docs:

from_logits:  Whether y_pred is expected to be a logits tensor. By default, we assume that y_pred encodes a probability distribution.
Note - Using from_logits=True may be more numerically stable.