How to correctly interpolate a variable in a JavaScript template literal for a URL in Oracle APEX?

I’m trying to construct a URL in Oracle APEX JavaScript using a template literal, but I’m running into an issue where the variable isn’t being interpolated correctly. Instead of getting the expected URL, the variable name is becoming weired.

Here’s what I’m doing:
In Execute when Page Loads Section:

const test = `url("f?p=&APP_ID.:1:&APP_SESSION.:APPLICATION_PROCESS=GETIMAGE:NO::IMAGE_ID:1745")`;
console.log(test);

For this I get the working URL as following:
url(“/ords/r/pj/employee-self-service-portal/home?image_id=1745&request=APPLICATION_PROCESS%3DGETIMAGE&session=890152562441&cs=12Y_buvBPIPUg6fQgAiURQM6QvOyCwIKjlcewXmOTiJMfdOkwT0QubRWuzmRHaSAuwXBtH4iDjQl1YMNWm72OXw”)

But know I want to use a variable instead of Hardcoded 1745
For example:

const imageId = 1745;
const test = `url("f?p=&APP_ID.:1:&APP_SESSION.:APPLICATION_PROCESS=GETIMAGE:NO::IMAGE_ID:${1745}")`;
console.log(test);

This results in:
url(“/ords/r/pj/employee-self-service-portal/home?image_id=%24%7BimageId%7D&request=APPLICATION_PROCESS%3DGETIMAGE&session=890152562441&cs=1dtlavkb6EP2nlZk9_KxMOcV6GSGzUTtKOAYodnsYe-DshAwwwSIr-pVAqpEb82XGSIHELUFeWMdJxKc5LrrAJQ”)
The Variable is not Set

Note:
It is a part of a bigger code in my Oracle APEX App. I want to create an Organization chart.
Created an Application Process of GETIMAGE.

Looking Forward for responses.