Varnish. And there's supposed to be tape holding them together, besides... (Mylar or Kapton tapes are typical.)
Epoxy or superglue is a good alternative, but beware (especially with superglue and other cyanoacrylates) they loosen at high temperatures, as varnish does too. If it's overheating, you have bigger problems than just the core falling out.
Tim