Get outline of mask

Hello I was wondering if there is any way to get the outline of a computed mask in a material (in my case a slope mask).
I tried the ComputeFilterWidth node but the results are very noisy.
If there was a way to blur that mask or shift it around that could work, but since this mask is calculated on the go (idk how these types of masks are called) it has no UVs.
I tried already to simply shift the slope threshold and blend by difference but this creates an outline with a lot of width variation

UP
Please if someone knows a workaround