When a formula references an external file, that reference disappears when copying and pasting

I have a Libre Calc file that I use regularly. It has a vlookup referencing another calc file. When you copy the cell and past it into a new sheet, that reference disappears rendering the formula useless.

Example: it goes from this:

=IFERROR(VLOOKUP(LEFT(U2,(IFERROR(FIND(" ",U2)-1,LEN(U2)))),‘file:///Users/thisuser/Folder/work/referenceFile.xlsx’#$‘list.txt’.$A$2:$A$7776,1,0),“NOT FOUND”)

to this:

=IFERROR(VLOOKUP(LEFT(U2,(IFERROR(FIND(" ",U2)-1,LEN(U2)))),1,0),“NOT FOUND”)

Is there a way to make this remain without actually going into the cell and selecting all the text and copying that?