How to deal with leftover work after changing employer?
This is maybe handled differently in different fields, but in any case you should inform you new advisor that you have to finish work from your previous position and discuss how this should be handled. Here are some models that I know:


Often it is expected, that postdoc do some independent work, so using this time to finish work with another workgroup is totally fine is this case.
In case your new position does not allocate time to do such work, you should inform your previous advisor. You may offer to work in your free (i.e. "non-work") time and ask for compensation (e.g. using a special contract - in German this could be a "Werkvertrag" but I don't know an English translation).
Your new advisor may get "on board" of your started project, so that your work on the project also falls under your new contract.