Cubic gold-platinum test-masses (TMs) play the role of free-falling geodesic reference and interferometer end mirrors of the future Laser Interferometer Space Antenna (LISA) observatory for low-frequency gravitational wave detection in space. A similar arrangement has been proposed for the Chinese missions Taiji and TianQin and for the LISA follow-on missions such as ALIA and BBO. The TMs are charged by high-energy particles and photons. The deposited charge couples with stray electric fields surrounding the TMs thus inducing spurious forces that limit the sensitivity of the mission mainly at low frequencies. The TM charging was measured in space in 2016-2017 with LISA Pathfinder (LPF), meant for the testing of the LISA instrumentation. Unfortunately, during the time LPF remained in orbit, no solar energetic particle events or major astrophysical phenomena were observed. We aim at estimating the LISA TM charging attributable to long, short gamma-ray bursts (GRBs) and magnetar flares in comparison to that of charged particles of galactic and solar origin. The contribution of these major astrophysical phenomena to the LISA TM charging is discussed here for the first time. The results found here can be extended to LISA-like missions. The response of the radiation monitors hosted on the three LISA S/C is also evaluated. We show that long, intense extragalactic GRBs and galactic magnetar flares at kpc distances can be detected and monitored through a sudden change from positive to negative charging of the TMs and an increase of the TM charging noise. This is a unique signature since both galactic and solar particles charge positively the LISA TMs. This peculiar behavior of the TM charging would allow monitoring the whole dynamics of GRBs. The suggestion reported in the literature, about the detection of long GRBs and gravitational waves from the same sources, in principle, may apply to LISA and other LISA-like missions since the increase of the TM charging noise during these extreme transient phenomena is estimated to remain below the mission sensitivity while particle detectors are expected to saturate.