Soft Clip [Free Shader] (Fade out objects when close to camera)

Hi everyone,
is there any way to replicate this in URP? @AlfEspinosaN solution works flawlessly with the Builtin renderer but is it possible to convert that to the new Render Pipelines?
I’ve been reading about issues with OIT (Order Independent Transparency) and also found this thread:

which is basically similar to this one, but I can’t believe there’s not an easy way to do the same in URP.
Thanks in advance.