If it’s a formula that will be written on every row, it’s better to use arrayformula and you don’t have to worry about the formula being seen as text.
Also, I’m not sure if RIGHT and LEN solve the problem here. The original source is already a text, so you would have to have something equivalent to an “evaluate” function in JavaScript to tell Excel/Sheet that please execute that formula, not to read it as text again.