My take on what the Pope said was that Trump's attitude towards illegal immigrants was not Christian.

As for the Vatican not allowing immigrants--they don't allow any immigrants, whereas Trump wants to discriminate against a particular group of immigrants. There's a difference.