Land-Sea-Mask Subset different results with SNAP and snappy


I have a procedure on SNAP that i am trying to repeat with snappy.
I have successfully installed snappy and repeated all Operators up until the last one, which is Land-Sea-Mask or Subset.

On SNAP i was able to use Land-Sea-Mask with an ESRI Shapefile to cut out a polygon. This reduced my data from 1 billion points to around 200k.
On Snappy when i use the same procedure with the same ESRI Shapefile the values aren’t cut but are instead replaced with “0.0”.
I tried using Subset with the same Shapefile, it did reduce and cut off some data, but i am still left with 75Million points and all data seems to be left in a rectangle that encompasses the whole Shapefile, not just the points inside the shape.

I found a similar topic but it did not solve my situation.

This is my code for using Land-Sea-Mask.

file = “myshapefile.shp”
parameters = HashMap()
parameters.put(‘separateShapes’, ‘false’)
parameters.put(‘vectorFile’, file)
geom = GPF.createProduct(‘Import-Vector’, parameters, inputfile)

parameters = HashMap()
parameters.put(‘geometry’, ‘myshapefile’)
parameters.put(‘invertGeometry’, ‘false’)
parameters.put(‘landMask’, ‘false’)
parameters.put(‘shorelineExtension’, ‘0’)
parameters.put(‘sourceBands’, ‘Sigma0_VV,Sigma0_VH’)
parameters.put(‘useSRTM’, ‘true’)
land_sea_mask = GPF.createProduct(‘Land-Sea-Mask’, parameters, geom)

This is my code for using Subset

shp = gpd.read_file(r’myshapefile.shp’)
geom = str(shp[‘geometry’][0])
geom = WKTReader().read(geom)

parameters = HashMap()
parameters.put(‘geoRegion’, geom)
parameters.put(‘sourceBands’, ‘Sigma0_VV,Sigma0_VH’)
subset = GPF.createProduct(‘Subset’, parameters, inputfile)

Is there something i am doing wrong when trying to achieve this?
If it is not possible to cut out the data the same way as in SNAP, is there a procedure to save only the desired values? Since i know that all the values i want to cut off are “0.0” after applying Land-Sea-Mask, can i save the data to .csv ignoring these values with snappy?