Non-determinism can occur when using certain functions. Take a look at the docs below to see if you have any of the operations mentioned that could lead to non-deterministic behavior:
Looking at my Contour processing, I realized there was an operation (array_agg) in an upstream step that could lead to non-deterministic behavior.
Given this, is it possible that the row counts calculated downstream could vary each time they are run?
I would follow the guide here to diagnose non-determinism and then modify the window function to see if you can order by something that will ensure that the code is running deterministically.