Thus this is a quite a detour, it will take nearly all day as there is no nighttrain for now-maybe again in summer. As for now you also MUST reserve seats in all DSB=danish IC trains-for free if you can understand danish at their site, this is for covid-distance rules.
There will also be more direct buses-via a ferry that takes a few hours,
Or if you feel very adventurous: take train via bridge/tunnel to Malmö-change for Ystad and use 1 of 2 ferries (POlferries or Unity line-both give a little discount)-to Swino-ujscie in PL-then train to Szczecin (which is much easier to say as you think)-then train to Berlin. Ferries go by day and overnite.