GitLab: Stop evaluating $ inside variable value

I am passing gitlab variable while running CI/CD pipeline as say:

type - variable
key - password
value - {"a": "abc$def@pqr"}

When I read it in some gitlab pipeline stage as say:

echo $password

It is showing:


But I want:


I don’t want it to evaluate $def as blank

P.S. I tried with \ escaping and with single quotes too
P.S. I need this to be in json kind of format itself for further use