Andrey Rublev rallied to beat Felix Auger-Aliassime in three sets on Sunday and win the Madrid Open for the first time.