Quantifying SARS-CoV-2 and mpox transmission patterns through phylodynamic inference