HRE has the unique ability to place relics in docks. However, when the dock is destroyed, so is the relic. In contrast to keeps, monasteries or the cathedral where the relics spawn at the edge of the ruins when the building collapses.
As a result an HRE that has 3 relics, of which one in a dock, may have only 2 relics to work with once the dock is destroyed. The only ‘workaround’ is to quickly take the relic with a prelate before the dock crumbles but given context that is mostly wishful thinking.
Given that this appears unique to docks and not at any other building (or faction) that I am aware of this this feels unintended. It is only a guess but I presume it is the result of docks being build in shallow water which is not eligible terrain for relics.