This reminds me of the case a British destroyer from WW1. This ship started as two Tribal class destroyers, HMS Nubian and HMS Zulu. In 1916, the first lost its bow to a torpedo (and then running aground); the second lost its stern to a mine. The admiralty decided to salvage the remains by joining them together into a new ship, dubbed HMS Zubian. https://www.twz.com/royal-navy-once-created-a-franken-ship-f...
(they're from an older class that is not being built anymore, but the Perle should remain in service a few more years until enough of the new class units are delivered)
https://www.naval-group.com/fr/naval-group-livre-le-sous-mar...
https://archives.defense.gouv.fr/content/download/611644/102...