Hazrat Umar RA never entered the Church of Holy Sepulcher in Jerusalem, but he did meet the priest outside the door of the church and wished him well.
Brother the only reason he did not go inside the church was just in case Muslims made a habit of it. This means that Umar(ra) clearly contemplated praying in the church but he prayed on the doorstep, which is part of the church.
The full event in detail below.
When he came within sight of Jerusalem, the caliph cried with a loud voice, ” God is victorious: ” O Lord, give us an easy conquest!” and, pitching his tent of coarse hair, calmly seated himself on the ground. After signing the capitulation, he entered the city without fear or precaution, and courteously discoursed with the patriarch concerning its religious antiquities. Sophronius bowed before his new master, and secretly muttered, in the words of Daniel, ” The abomination of desolation ” is in the holy place.” At the hour of prayer they stood together in the church of the Resurrection; but the caliph refused to perform his devotions, and contented himself with praying on the steps of the church of Constantine. To the patriarch he disclosed his prudent and honourable motive. ” Had I yielded,” said Omar, ” to your request, the Moslems of a future age would have infringed the treaty under colour of imitating my example.” By his command the ground of the temple of Solomon was prepared for the foundation of a mosch; and, during a residence of ten days, he regulated the present and future state of his Syrian conquests.
Regarding churches and synagogues
Verse 22:40
[They are] those who have been evicted from their homes without right - only because they say, "Our Lord is Allah." And were it not that Allah checks the people, some by means of others, there would have been demolished monasteries, churches, synagogues, and mosques
in which the name of Allah is much mentioned. And Allah will surely support those who support Him. Indeed, Allah is Powerful and Exalted in Might.