BERLIN—Germany’s naval brass in 2005 dreamed up a warship that could ferry marines into combat anywhere in the world, go up against enemy ships and stay away from home ports for two years with a crew half the size of its predecessor’s.

First delivered for sea trials in 2016 after a series of delays, the 7,000-ton Baden-Württemberg frigate was determined last month to have an unexpected design flaw: It doesn’t really work.

Defense...