Recommended Loss function for Imbalanced multiclass Semantic Segmentation problem

Hi Guys,
Do you have any recommendations for loss function in the Imbalanced multiclass Semantic Segmentation problem? The weight difference in each class is pretty huge actually, like [0.1, 0.1, 0.4, 0.4]
currently, I’m using LovaszBCELoss, it’s good for accuracy, but the f1-score is pretty bad, 0.9 acc but 0.7 F1 (weighted F1).