Yes, that was the norm during his era, whether praying in the mosque or not. It was only exceptionally he would take them off.
With the introduction of carpets in mosques, Muslims generally remove shoes before praying. Either approach is permitted in Islam and does not affect the prayer.
If one prays with shoes on, they should ensure there is no filth on them.
It was narrated the Prophet (saw) used to pray wearing his shoes. Anas ibn Malik (ra) was asked, “Did the Prophet (saw) pray wearing shoes?” He said, “Yes.” (Sahih al-Bukhari, 386; Muslim, 555)
While the Messenger of Allah (saw) was leading his companions in prayer, he took off his shoes and placed them to his left. When the people saw that, they took off their shoes too. When the Messenger (saw) finished his prayer, he asked, ‘What made you take off your shoes?’ They said, ‘We saw you take off your shoes, so we took ours off too.’ The Messenger (saw) said, ‘Jibreel came to me and told me that there was something dirty on them.’ When any one of you comes to the mosque, let him look and if he sees anything dirty on his shoes, let him wipe them and then pray in them. (Abu Dawud, 650)
The Prophet (saw) said, “Be different from the Jews, who do not pray in their shoes (khufoof).” (Abu Dawud, 652)