In short: no you do not have to add anything about the threshold you have chosen to the loss function.
Your model isn’t calculating the loss based the label that is ultimately chosen. It is calculating loss based on the strength of the prediction with respect to the correct label.
For example, if the model assigns a probability of 0.55 to class 1 (suppose this is the true label), there is still a loss value associated with this, even though it is the correct label. That is because the model is trying to maximize the probability of choosing the correct label. So predicting 0.55 for the correct class results in a higher loss than predicting 0.95 for the same class, even though at inference time the model would be choosing the same label.