Motivation: miRNA functional enrichment is a type of analysis that is used to predict which biological functions may be affected by a group of miRNAs or validate whether a list of dysreg- ulated miRNAs are linked to a diseased state. The standard method for functional enrichment analysis uses the hypergeometric distribution to produce p-values, depicting the strength of the association between a group of miRNAs and a biological function. However, in 2015, it was shown that this approach suffers from a bias related to miRNA targets produced by target prediction algorithms and a new randomization test was proposed. Results: In this paper, we demonstrate the existence of another underlying bias which affects gene annotation data sets; additionally, we show that the statistical measure used for the estab- lished randomization test is not sensitive enough to account for it. For this reason, we propose the use of an alternative statistical measure, the "two-sided overlap", and we show that it is able to alleviate the aforementioned issue. Finally, we develop BUFET2, a miRNA enrichment analysis tool that leverages this measure (along with the old one); it is based on BUFET, a fast and scalable implementation of the established randomization test. Availability and Implementation: BUFET2 is written in C++ and is packaged with a Python wrapper script that facilitates experiment execution. Moreover, BUFET2 also comes pre-packaged in a Linux Docker image published on Docker Hub, thus eliminating the need for code compilation. Finally, BUFET2 is also publicly available to execute through a REST API. All datasets used in the experiments throught this paper are openly accessible on Zenodo (https://doi.org/10.5281/zenodo.5175819).