Deploying a Factory Default Widget Provider removes widgets from pages

I've created a Factory Default Widget Provider so that I can source control my widget changes. I create/edit widgets in a development environment then use the Factory Default Widget Provider to deploy those changes to UAT and Production.

When I deployed the Factory Default Widget Provider to UAT yesterday, it removed any of the changed widgets from all the pages that used them.

For example, I have a custom footer widget that was used on every page. I made some small changes to the widget code, then deployed using the Factory Default Widget Provider. This completely remove the footer widget from every page of the site.

I don't think this is correct behaviour, does anyone know how to prevent it.

Thanks

Steve