It's generally advised to always travel all legs of a journey on the same passport to not mess up Exit Checks. The challenge is that UK is still struggling to introduce Exit Checks so the UK systems are not an accurate reflection of who is and who is not in the country.
If, at some point, the UK would get its border control in order (I am not counting on it happening any time soon, it took seven years of trying to implement e-Borders and give up on it again) you might have an issue when you travel to the UK on a German passport but leave on a UK passport as it may appear in UK systems that some German citizen has stayed in the country. For now that is not a real risk due to the UK systems not working well.
The other way around is a bigger issue. The Schengen Area has its systems pretty well set up and so if you enter Germany on a UK passport but leave on a German one you might get flagged for overstaying in the Schengen Area. The way it's looking now (unless there is some agreement on this at some stage) UK Citizens will only be allowed 90 days out of a 180 day period to stay in the Schengen Area without a visa. It will then depend on German immigration whether they go and look for this 'illegally immigrated Brit' or whether you get flak the next time you pass any Schengen border.