The UK / German double taxation agreement, advises that if a resident of the UK, is in receipt of a pension, annuity or other similar remuneration, arising in Germany, they are only taxable in the UK on this source. This is a reciprocal agreement, so if a resident of Germany, has a UK arising pension, annuity or other similar remuneration, it is only taxable in Germany.
Any tax deducted in the country, where it is not taxable, would need to be reclaimed by the individual from the relevant tax authority. If the pension is not taxable in the UK, then you would complete a form:
Double Taxation: treaty relief (Form DT-Individual (Germany))
and send it to the German tax authorities to validate. They would return it to you and you then send to HMRC, using the address on the form.