From the Raspberry Pi Foundation documentation at https://www.raspberrypi.org/documentati ... /README.md
For headless setup, SSH can be enabled by placing a file named ssh, without any extension, onto the boot partition of the SD card from another computer. When the Pi boots, it looks for the ssh file. If it is found, SSH is enabled and the file is deleted. The content of the file does not matter; it could contain text, or nothing at all.
So it is expected behaviour that the file is deleted.
Whether SSH is enabled from the raspi-config utility or via the ssh marker file, the setting is persistent and should survive a reboot of Raspbian.