# Different results meta vs metafor

I'm running a meta-analysis of single proportions. I know this can be done in both meta and metafor but I am getting slightly different results using both the moment I add in smaller studies.

Suppose this dataset of just "larger" studies:

study total cases
study1 50 31
study2 80 37
study3 25 10

When I run meta and metafor I do get the same result (0.5047 (95% CI: 0.4271-0.5823)) but in my meta-analysis, I have a few smaller studies that I would like to include. That's when the two results diverge.

Suppose this dataset of all studies:

study total cases
study1 50 31
study2 80 37
study3 25 10
study4 3 2
study5 4 2
study6 3 3

I get different results:

meta: 0.5729 {95% CI: 0.3604-0.7855)

metafor: 0.5488 (95% CI:0.3846-0.7130)

After some investigation, I realize that the difference is in the weights each one is giving to the studies with meta giving more weight to the smaller studies but can someone explain to me why that is happening? (with the "larger" studies only dataset, they both give the same weights). For example, study6 has a weight of 12.6% in meta vs. 10.6% in metafor.

This is the code I am using to run both:

# metafor
escalc.test=escalc(xi=cases, ni=total, data=test, measure="PR")

rma.test=rma(yi, vi, data=escalc.test, method="DL", knha = TRUE)

# meta
metaprop(cases, total, data=test, studlab=paste(study), sm="PRAW", comb.random = TRUE, hakn=TRUE, method.tau="DL", prediction=TRUE)


There is one study where the number of cases equals the sample size, so the proportion is equal to 1. However, in metafor, the commonly used adjustment of adding 1/2 is applied for computing both the proportion and the corresponding sampling variance for this study, while meta only applies this adjustment for computing the sampling variance. To get identical results, use:
escalc.test=escalc(xi=cases, ni=total, data=test, measure="PR", addyi=FALSE)

With addyi=FALSE, the 1/2 adjustment is not applied when computing the proportions and then the results are the same.