The RPi2 has 512MB internal memory, of which Kodi takes up roughly half. So I don't think a swap file will help, also because a SDcard will be painfully slow handling a swap file.
Ethernet drop outs I saw once or twice on my RPi4-4GB with Raspbian running the Kodi application doing some 4K video. This happened with Kodi's internal NFS mounts which is usually okay. You could try to create system mounts in LibreELEC instead, and point Kodi to those mounts for your source(s).