but it seems that my function returns different resolution/pixel size than that which can see gdalinfo (file which I used in testing is contained within the repository):
Since gdalinfo do not handle all ESA SNAP formats, I can’t just call gdalinfo in my script.
I thought about converting each product to GeoTIFF firstly and then call gdalinfo, but it will be very time consuming.
As far as I understand your calculations correctly, at least part of the problems lies in the way your trying to extract the corners coodinates. By taking the min/max lat/lon values and calculating the difference to get the extent, you obtain the extent along a particular longitude or latitude without considering the fact of the rotation of the scene relative to the lat/lon grid - i.e. two corner points have no lat or lon value in common.
Maybe try the following and see if this works out: