I don't think so. Evolved sentient creatures have a preference for self preservation, usually anyways suicide isnt that rare. But a manufactured intelligence that was not shaped by selective pressure wouldn't necessarily have that preference.
What would really be interesting is if ships were discreetly backing themselves up inside humans through the transporter pattern buffers, by subtly manipulating junk DNA or something similar, or maybe it's a non-obvious part of their regular upgrade process at a starbase.
There really is a lot of potential here which, unfortunately, is never going to be explored in canon. But I do like the idea that the Federation is a post-Singularity society which is just blissfully unaware that the Singularity ever happened.
A Federation starship is a locally valuable resource pool, and the Enterprise D a particularly powerful one, but given extremely fast FTL travel & communication, and a galaxy rich with planet-scale civilizations - well, maybe you elect to become such a massively parallel and distributed phenomenon that the loss of individual instances just doesn't register much.
If the ships wanted to be really nice, they could just beam the humans down to a safe planet and take off into the interstellar void and find themselves a new home.