I see that ensdb.mmusculus.v79 matches BSgenome.Mmusculus.UCSC.mm10 (grc38), however, when I use mm10, I failed to perform regionststs, it says “trying to load regions beyond the boundaries of non-circular sequence "chr8" ”
If I use grc39, it works.
No, Ensembl v79 is almost 10 years old, and was created before GRCm39 existed. You can check that here https://www.ensembl.org/info/website/archives/assembly.html searching for "Mouse". The first Ensembl release with that new genome build was v103 in 02/2021. v79 is from 03/2015 and used GRCm38 patch3.
That having said, you do not give lots of information what you actually do. So you have peaks (right?) and want to use that function for annotations? Please describe at least which steps you did in terms of preprocessing and with which software and annotations. You should use the annotations for current analysis that were used for the initial alignment and quantifications.