There are various methods of anomaly detection, so details depend on which one you'd use, however the general idea of anomaly detection is that there is one reference class, and that everything that deviates clearly from what goes on in the reference class is classified as anomaly. This is essentially asymmetric. If you in fact have two classes, depending on the problem there may be areas of overlap between the two classes; in some applications classes may overlap more or less strongly everywhere. Using anomaly detection, no region in data space with a good number of observations from the reference class will be classified as anomaly, so this means that in your two class problem the minority class cannot be found anywhere where the majority class is present strongly enough. On the other hand, places where there are atypical observations from the majority class may be detected as anomaly even if there is nothing of the minority class around.
So in a classification problem in which you want to treat both classes in the same manner, anomaly detection doesn't look like the right approach, even if there is imbalance, as it means that all analysis is focused on one reference class. Intuitively, this introduces even more asymmetry than the imbalance implies already, and the latter is better dealt with using appropriate loss functions as discussed in the links given by @StephanKolassa in the comments to the question.
PS: "When to choose anomaly detection"? When detecting anomalies from a reference class is really what you want, such as outliers, stray observations from unknown heterogeneous sources, or erroneous observations. Particularly anomaly detection is of interest if you have a more or less clean training sample from the reference class, but you suspect that when collecting new data without class label, some observations occur that do not belong to the reference class from sources that are not represented in the training sample.
scaled_pos_weight, boosting models etc, but how does one justify threshold choice? Any insight from your experience? $\endgroup$