How to use a distance dependent dielectric constant, ε(r), in GROMACS?

GROMACS version: 2020.5
GROMACS modification: No

I want to run some simulations but I want to see how a distance dependent dielectric constant would affect the outcome of my simulation. Can I perform something like this in Gromacs? Would anyone know how I can implement this?

No, you can not do this in GROMACS, unless you use user tabulated potentials. The last version that supports those is 2019.

But why do you want to use a distant dependent dielectric constant? That is unphyiscal.