I am working on a Python script in QGIS 3 that creates buffers around points in Web Mercator (EPSG:3857) and transforms the buffers into WGS84 (EPSG:4326).
I have a problem with geometries that cross antimeridian (180 deg longitude) - after transformation the buffers (circles) show up as long rectangles that span from -180 to +180 longitude, with actual buffers (circles) being "excluded" from these geometries.
Fig. 1: Buffer in Web Mercator that crosses antimeridian
Fig. 2: Buffer after transforming into WGS84
How best to transform geometries that span across antimeridian?
Is there a way to fix the output geometries?

