Chiral and deconfinement transitions in a magnetic background using the functional renormalization group with the Polyakov loop