President Donald Trump's dismissal of Pope Leo XIV as "weak" and "wrong" marked an unprecedented personal attack on a pontiff by a US leader that capped months of tension.