Gamma-ray bursts (GRBs) are the most energetic explosions in the universe. They are collimated, ultra-relativistic outflows which are initially detected as brief flashes of gamma-rays. As the relativistic ejecta starts to interact with the circumburst medium, a pair of shocks are formed where magnetic fields are amplified and charged particles are accelerated. These particles emit synchrotron radiation observable throughout the whole electromagnetic spectrum. This long-lived emission is called the afterglow of the GRB. The afterglow emission contains valuable information regarding the dynamics of the outflow, energetics and environments of GRBs, and microphysics of relativistic shocks. In this work, we improve the method we have developed in Aksulu et al. (2020) where we use Gaussian processes (GPs) to account for the systematics in the observed afterglow emission. This method enables us to obtain reliable estimates of the GRB parameters even when the dataset contains systematics. We gather a sample of multiwavelength short and long GRB afterglow datasets and perform Bayesian inference using the improved GP model in order to probe the physics of GRBs. Finally, we present our findings regarding the dynamics, energetics, and environments of these catastrophic events.