A better way I found to get rid of this issue in javascript is:
JSON.parse(JSON.stringify(String.raw`${your_string}`))