This may be due to certain characters in the BLF causing the provisioning config file to be unsupported by the phone.
Some examples:
You can download a phone's provisioning file by appending the phone's mac address to the end of the provisioning url followed by .cfg
For example:
https://crst.3cx.uk:5001/provisioning/iamzanaza4zan9/00aa11bb22.cfg
Open the config file in Visual Studio Code:
Look for any anomalies such as the colour coding changing next to the scrollbar:
Going to that location in the document you can see the issue:
Some characters may take additional effort or trial & error to resolve, such as:
The colours haven't changed here so the problem wouldn't be as immediately obvious.
A quick solution to reprovisioning a phone might be to clear all BLFs before reprovisioning.
XML prohibited characters:
https://www.w3resource.com/xml/prohibited-character-literals.php