You can't force someone to worship God.
Indeed you can't - but you CAN make it illegal to publicly worship false gods.
Syllabus of condemned errors:
15. Every man is
free to embrace and profess that religion which, guided by the light of reason,
he shall consider true. -- Allocution "Maxima quidem," June 9, 1862; Damnatio "Multiplices inter," June 10, 1851. CONDEMNED.
77. In the present day it is no longer expedient that the Catholic religion should be held as the
only religion of the State, to the exclusion of all other forms of worship. -- Allocution "Nemo vestrum," July 26, 1855. CONDEMNED.
78. Hence it has been wisely decided by law, in some Catholic countries, that persons coming to reside therein shall
enjoy the public exercise of their own peculiar worship. -- Allocution "Acerbissimum," Sept. 27, 1852. CONDEMNED.