The reason for the difference is that pwr:pwr.2p.test uses a different approach for calculating Cohen's effect size h, i.e. it uses arcsin transformation. In contrast, GPower as well as the built-in power test from the stats library use an approximation.
To match results between pwr and GPower, go to GPower and when entering your model details, select "Options" at the bottom and turn on arcsin transformation.
Quote from GPower documentation (bolding added by me):
Numerous procedures have been proposed to test the null hypothesis
that two independent proportions are identical (Cohen, 1988;
DAgostino, Chase, & Belanger, 1988; Suissa & Shuster, 1985; Upton,
1982), and G*Power 3 implements several of them. The simplest
procedure is a z test with optional arcsin transformation and optional
continuity correction. Besides these two computational options, one
can also choose whether Cohens effect size measure h or,
alternatively, two proportions are used to specify the alternate
hypothesis. With the options Use continuity correction off and Use
arcsin transform on, the procedure calculates power values close to
those tabulated by Cohen (1988, chap. 6). With both Use continuity
correction and Use arcsin transform off, the uncorrected 2
approximation is computed (Fleiss, 1981); with Use continuity
correction on and Use arcsin transform off, the corrected 2
approximation is computed (Fleiss, 1981).
Source: https://paperity.org/p/19044909/g-power-3-a-flexible-statistical-power-analysis-program-for-the-social-behavioral-and