This is true, which is why machine learning has long since learned to not even think of what you describe as a meaningful measure of accuracy. If you look at the linked paper [0], you'll find that the author uses the "ROC AUC" metric [1]:
>The ROC AUC score represents the probability that when given one randomly chosen positive instance and one randomly chosen negative instance, the classifier will correctly identify the positive instance
[0] https://arxiv.org/pdf/1902.10739.pdf [1] https://en.wikipedia.org/wiki/Receiver_operating_characteris...