Transparency issues when reading from s3

I am having som issues with transparency when using my mino/s3 storage for geotiffs. I either get black borders, or fully transparent images when viewing them. It seems to have with my image format to do but also how geoserver reads data. I process the images with gdal_translate.

gdal_translate -co BIGTIFF=YES -co COMPORESS=JPEG -of COG –config GDAL_TIFF_INTERNAL_MASK=YES

or

gdal_translate -co BIGTIFF=YES -co COMPRESS=WEBP -co QUALITY=90 -co ADD_ALPHA=YES -of COG

When i use JPEG compression i get black borders. When i use WEBP compression i get fully white/transparent view, e.g. i cant see the image at all. When i publish the images directly to geoserver via GUI they work flawlessly. When i change to other compression format (deflate, lzw) it works, but i am looking to save space and avoid big files if possible.

Is there a way to use minio/s3 as storage and keep effective compression formats like JPEG or WEBP?