She did come, but she didn't stay long.

Literal

She [topic-は] come [emphasis-ことは] came [but-が], long [contrast-は] was-not-there.

~ことは~が is a concessive emphasis pattern — 'she did X, but...' The repeated verb (来ることは来た) acknowledges the action while setting up a contrast. 長くはいなかった uses contrastive は to emphasize the shortness of the stay.