Engine problems in 1943 severely restricted her activities and she was transferred to the Baltic in early 1944 after repairs were completed. "Z25" spent most of the rest of the war escorting ships as the Germans evacuated East Prussia and bombarding Soviet forces. The ship was captured by the Allies in May 1945 and spent the rest of the year under British control as the Allies decided how to dispose of the captured German ships.