CrossEntropyLoss optimizes the overall classification accuracy as $$ {n_{\text{correct}} \over N} $$
What loss function should I use if I only care about increasing the true positive rate of one class?
$$ {n_{\text{true A in predicted A}} \over N_{\text{predicted A}} } $$
For example, I predict 100 images to be in class A, and 90 out of this 100 are truly A. So the accuracy is 90%.
In the meantime, I predict another 900 images to be in class B, but 500 of them are actually A, and only 400 are B. So the overall accuracy is (90+400)/(100+900) = 49%.
In the meantime, I don't want $ N_{\text{predicted A}} $ to be too small, since one can see from above that a smaller $ N_{\text{predicted A}} $ can likely lead to larger true positive rate.