On a customer's store I'm facing a big problem since the code I add on specific files randomly disappears.
My client needed in fact a custom script to automatically add billing informations inserted in cart page to order details in Shopify Store backoffice. I solved the problem by adding a script in "ly-core-scripts.liquid" file to add through Shopify cart API the required information as cart attributes in order to have them visible where needed, though every time I save the file with the needed code it automatically disappears after a while.
Does Shopify have rules to prevent custom scripts in stores core files like "ly-core-scripts", and how could I work around this problem ?
I also wanted to clarify that I already made sure to be the only one having the file opened on the online editor while applying the changes to prevent others from changing my code.