How do I prevent external file links to get changed into a number in brackets after having saved

Within file “x”, I made links (‘file:///filepath/filename’#sheet.range) with formulas and calculations to search within file “y”.

In some windows, I also made links within data validation to cover a cell range from the other file.

All the links and formulas work correctly after having written them.

But after saving, closing, opening, the link names get reduced to the same number in brackets, and no longer work.

In what format (e.g. .ods, .xls, .xlsx etc) are you saving the file(s)

Assuming .xlsx
What version of LibreOffice?

I save in .xlsx

But what’s interesting is that is some other files, all in .xlsx, these links have worked, while in others they don’t. I’ve been trying to figure out what I did different but haven’t found a difference.

On version 5.2.7.2