An equivalent result (still) using the GR backend via Plots would be the following:
using Plots; gr()
img = rand(300, 300)
p = Plots.plot(img) # create your own here
plot!(size=(300,300))
Plots.savefig(p, "p.png") # note: savefig from Plots
Until you figure it out (or somebody can help with a pure GR solution), you can use this approach - in the end, it is still using the GR backend (I think GR is actually the default backend for Plots - so I don’t think you need to call gr()) specifically.
Later edit: By the way - without calling plot!(size=(300,300)), the Plots.savefig would also output a different size from 300x300. I think the size would be similar to the one produced by GR. I think a configuration method similar to the one for Plots should exist for GR (maybe it is not documented properly - I also looked at the tests, and the only thing they test for is for the resulting file to have a disk size larger than a certain value).