The energy can be lost by the system as EM radiation. I think your problem is similar to that discussed in:
https://www.edaboard.com/threads/234498/
Charging a capacitor means you are pushing a charge through connecting conductor into it. You need a "charge supply" like a battery or another capacitor, and you need a dielectric material between capacitor electrodes, to help holding that charge.
Typical loss are the following:
1. Internal resistance of your charge supply. Moving the charge in the circuit causes a part of it to dissipate as heat.
2. Connecting conductors, also "long" capacitor electrodes ; their resistance times the square of current (pulse) equals to another dissipated heat.
3. In addition to 2., charge movement through the conductors, due to their inductance, causes a part of energy is radiated as electro-magnetic field.
4. Dielectric in the capacitor, as the charge appears on capacitor electrodes, is polarized. Polarization means the electrical dipoles in dielectric material are forced to a new orientation. Their movement means another loss dissipated as heat, and polarization in the dielectric.
5. If the circuit is interrupted after the capacitor is charged, fine. But if kept closed, the capacitor discharges back, and the charge, with all above losses, returns into the supply where it may be lost as heat.
6. The closed circuit may allow the charge to continue through the source, so then the current flows in reverse direction; such effect is oscillatory and gradually the current of charges is attenuated after several exchanges (oscillations).
All above effects are known and measurable. Typically it is assumed that during a single capacitor charge, >50% of energy is lost. Not an easy thing to really analyze.