The code runs with no errors but the topographic phase subtraction does not seem to be working. I suspect the parameters are not correcly defined and i’ve tried many variations.
In both cases, I didn’t change anything related to the window size.
However, on the left side image I used a Terrain Correction with a “Pixel Spacing” of 20 m, while on the right side image I used “Pixel Spacing” of 13.89 m (default value).
I had a similar issue and fixed it by setting the ‘coherence range window size’ and ‘coherence azimuth window size’ parameters when generating the interferogram. This produced a coherence image that matched the resolution when I did the processing using the SNAP gui.