Hydrological models that are used to analyse flood risk induced by tropical cyclones often input ERA5 reanalysis data. However, ERA5 precipitation has large systematic biases, especially over heavy precipitation events like Tropical Cyclones, compromising its usefulness in such scenarios. Few studies to date have performed bias correction of ERA5 precipitation and none of them for extreme rainfall induced by tropical cyclones. Additionally, most existing works on bias adjustment focus on adjusting pixel-wise metrics of bias, such as the Mean Squared Error (MSE). However, it is equally important to ensure that the rainfall peaks are correctly located within the rainfall maps, especially if these maps are then used as input to hydrological models. In this paper, we describe a novel machine learning model that addresses both gaps, RA-Ucmpd, based on the popular U-Net model. The key novelty of RA-Ucmpd is its loss function, the compound loss, which optimizes both a pixel-wise bias metric (the MSE) and a spatial verification metric (a modified version of the Fractions Skill Score). Our results show how RA-Ucmpd improves ERA5 in almost all metrics by 3-28%—more than the other models we used for comparison which actually worsen the total rainfall bias of ERA5—at the cost of a slightly increased (3%) error on the magnitude of the peak. We analyse the behaviour of RA-Ucmpd by visualizing accumulated maps of four particularly wet tropical cyclones and by dividing our data according to the Saffir-Simpson scale and to whether they made landfall, and we perform an error analysis to understand under what conditions our model performs best.