Specifically Spire Maws (mobile), and AI Starship Deconstructors (these are guardians). They ingest your ships like they a transport, but instead of carrying them safely, they constantly are breaking them down inside. If you destroy the swallower in advance of your ships being completely destroyed inside of it, your ships will pop back out with whatever health they had remaining.