The actual value is encrypted and stored in the config XML.
The config.xml git repo is within the gocd db directory. You could explore the history to see the earlier versions of the file. The Web view from the link I gave earlier shows the config diffs. Since you had said that you had deleted the variable by mistake, looking into the history will help you get the variable with the encrypted value back. Once you restore it, you should be able to use it.
Here's something from a temporary GoCD instance I set up to explore this for you.
vagrant@ubuntu-bionic:~/go-server-21.1.0/db/config.git$ git log
commit bd609d9444d6dd5533a73c6e30d787c45950c75a (HEAD -> master)
Author: Upgrade <
sup...@thoughtworks.com>
Date: Mon Feb 22 16:14:41 2021 +0000
user:Upgrade|timestamp:1614010481388|schema_version:139|go_edition:OpenSource|go_version:21.1.0 (12439-5a4959c7c4ede49165ec961b0219126cd5aa9e52)|md5:7fadaea9b89acb2f4d695812e04c2346
vagrant@ubuntu-bionic:~/go-server-21.1.0/db/config.git$ pwd
/home/vagrant/go-server-21.1.0/db/config.git