To use command ${!URL} you must load before the url, after it works.
I use alternative solution to save current url in any time
{
"Name": "Save_Current_Url",
"CreationDate": "2020-8-23",
"Commands": [
{
"Command": "executeScript",
"Target": "return (window.location.href)",
"Value": "executeScript_Sandbox_result"
},
{
"Command": "echo",
"Target": "${executeScript_Sandbox_result}",
"Value": ""
}
]
}