Geometry.offset_polygon2d()
inflates the shape, kinda confusing.
But what you want is a Transform2D
. For example if you want to offset the polygon by 50px in the x and y direction you do something like this:
var polygon = PoolVector2Array([Vector2(0, 0), Vector2(100, 0), Vector2(100, 100), Vector2(0, 100)])
var offset = Vector2(50, 50)
polygon = Transform2D(0, offset).xform(polygon)
print(polygon) # prints [Vector2(50, 50), Vector2(150, 50), Vector2(150, 150), Vector2(50, 150)]