I am not sure about the internal implementation of the library regarding the imbalanced datasets, but normally, when you are dealing with imbalanced datasets, the rule is to use not just an accuracy indicator but also precision, recall, and F1 score. If you can find the implementation of the library, you can check the internals. If the only metric given as output is accuracy, perhaps it’s not that good, though.