I have a custom web service (codeunit) that I use in a Sandbox cloud environment, and I'm using it to return metadata on some of the properties in various tables. It was coded using the AL extension and it works, but at seemingly random intervals when I call the service it will return 404, at which point I just need to reopen VSCode and run the command "Publish and open in the designer". After that it will work again for a while before breaking again.
I suppose I have two questions:
1.) What is the cause of this?
2.) If it's something I need to work around, is it possible to create a script that will publish that codeunit automatically when it breaks?